[Python-checkins] r73487 - in python/branches/tk_and_idle_maintenance: Doc/c-api/int.rst Doc/distutils/setupscript.rst Doc/library/bisect.rst Doc/library/cgi.rst Doc/library/contextlib.rst Doc/library/ctypes.rst Doc/library/curses.panel.rst Doc/library/curses.rst Doc/library/fcntl.rst Doc/library/io.rst Doc/library/itertools.rst Doc/library/os.rst Doc/library/pickletools.rst Doc/library/platform.rst Doc/library/random.rst Doc/library/string.rst Doc/library/subprocess.rst Doc/library/ttk.rst Doc/tools/sphinxext/patchlevel.py Doc/whatsnew/2.7.rst Grammar/Grammar Include/pyerrors.h Lib/_pyio.py Lib/contextlib.py Lib/distutils/ccompiler.py Lib/distutils/command/bdist_msi.py Lib/distutils/command/upload.py Lib/distutils/cygwinccompiler.py Lib/distutils/sysconfig.py Lib/distutils/tests/test_ccompiler.py Lib/distutils/tests/test_cygwinccompiler.py Lib/distutils/tests/test_sysconfig.py Lib/distutils/tests/test_upload.py Lib/filecmp.py Lib/idlelib/EditorWindow.py Lib/io.py Lib/lib2to3 Lib/lib2to3/Grammar.txt Lib/lib2to3/fixer_base.py Lib/lib2to3/fixer_util.py Lib/lib2to3/fixes/fix_apply.py Lib/lib2to3/fixes/fix_basestring.py Lib/lib2to3/fixes/fix_buffer.py Lib/lib2to3/fixes/fix_callable.py Lib/lib2to3/fixes/fix_dict.py Lib/lib2to3/fixes/fix_except.py Lib/lib2to3/fixes/fix_exec.py Lib/lib2to3/fixes/fix_execfile.py Lib/lib2to3/fixes/fix_filter.py Lib/lib2to3/fixes/fix_funcattrs.py Lib/lib2to3/fixes/fix_future.py Lib/lib2to3/fixes/fix_getcwdu.py Lib/lib2to3/fixes/fix_has_key.py Lib/lib2to3/fixes/fix_idioms.py Lib/lib2to3/fixes/fix_import.py Lib/lib2to3/fixes/fix_imports.py Lib/lib2to3/fixes/fix_input.py Lib/lib2to3/fixes/fix_intern.py Lib/lib2to3/fixes/fix_isinstance.py Lib/lib2to3/fixes/fix_itertools.py Lib/lib2to3/fixes/fix_itertools_imports.py Lib/lib2to3/fixes/fix_long.py Lib/lib2to3/fixes/fix_map.py Lib/lib2to3/fixes/fix_metaclass.py Lib/lib2to3/fixes/fix_methodattrs.py Lib/lib2to3/fixes/fix_ne.py Lib/lib2to3/fixes/fix_next.py Lib/lib2to3/fixes/fix_nonzero.py Lib/lib2to3/fixes/fix_numliterals.py Lib/lib2to3/fixes/fix_paren.py Lib/lib2to3/fixes/fix_print.py Lib/lib2to3/fixes/fix_raise.py Lib/lib2to3/fixes/fix_raw_input.py Lib/lib2to3/fixes/fix_reduce.py Lib/lib2to3/fixes/fix_renames.py Lib/lib2to3/fixes/fix_repr.py Lib/lib2to3/fixes/fix_set_literal.py Lib/lib2to3/fixes/fix_standarderror.py Lib/lib2to3/fixes/fix_sys_exc.py Lib/lib2to3/fixes/fix_throw.py Lib/lib2to3/fixes/fix_tuple_params.py Lib/lib2to3/fixes/fix_types.py Lib/lib2to3/fixes/fix_unicode.py Lib/lib2to3/fixes/fix_urllib.py Lib/lib2to3/fixes/fix_ws_comma.py Lib/lib2to3/fixes/fix_xrange.py Lib/lib2to3/fixes/fix_xreadlines.py Lib/lib2to3/fixes/fix_zip.py Lib/lib2to3/patcomp.py Lib/lib2to3/pytree.py Lib/lib2to3/refactor.py Lib/lib2to3/tests/data/README Lib/lib2to3/tests/data/different_encoding.py Lib/lib2to3/tests/data/fixers/myfixes/fix_parrot.py Lib/lib2to3/tests/data/py2_test_grammar.py Lib/lib2to3/tests/data/py3_test_grammar.py Lib/lib2to3/tests/pytree_idempotency.py Lib/lib2to3/tests/support.py Lib/lib2to3/tests/test_all_fixers.py Lib/lib2to3/tests/test_fixers.py Lib/lib2to3/tests/test_parser.py Lib/lib2to3/tests/test_pytree.py Lib/lib2to3/tests/test_util.py Lib/logging/handlers.py Lib/msilib/__init__.py Lib/multiprocessing/queues.py Lib/os.py Lib/random.py Lib/subprocess.py Lib/symbol.py Lib/test/cmath_testcases.txt Lib/test/doctest_aliases.py Lib/test/formatfloat_testcases.txt Lib/test/test_ast.py Lib/test/test_bufio.py Lib/test/test_coding.py Lib/test/test_compile.py Lib/test/test_curses.py Lib/test/test_doctest.py Lib/test/test_file.py Lib/test/test_file2k.py Lib/test/test_fileio.py Lib/test/test_generators.py Lib/test/test_genexps.py Lib/test/test_io.py Lib/test/test_largefile.py Lib/test/test_memoryio.py Lib/test/test_signal.py Lib/test/test_support.py Lib/test/test_syntax.py Lib/test/test_univnewlines.py Lib/test/test_univnewlines2k.py Lib/test/test_winreg.py Makefile.pre.in Misc/NEWS Modules/_bytesio.c Modules/_fileio.c Modules/_io Modules/audioop.c Modules/mmapmodule.c Objects/exceptions.c Objects/floatobject.c PC/VC6/pythoncore.dsp PC/VS7.1/pythoncore.vcproj PC/VS8.0/pythoncore.vcproj PC/_winreg.c PC/config.c PCbuild/pythoncore.vcproj Parser/Python.asdl Parser/asdl.py Parser/asdl_c.py Parser/grammar.mak Parser/tokenizer.c Python/Python-ast.c Python/ast.c Python/compile.c Python/errors.c Tools/msi/msi.py configure configure.in setup.py

guilherme.polo python-checkins at python.org
Sat Jun 20 00:11:18 CEST 2009


Author: guilherme.polo
Date: Sat Jun 20 00:11:15 2009
New Revision: 73487

Log:
Merged revisions 73278-73282,73286,73294,73296,73299,73303,73305,73308,73312-73314,73317-73318,73321,73324-73326,73328,73331,73334-73336,73340-73341,73345,73348,73350,73353-73354,73361-73363,73367,73370,73372,73376,73382,73390,73393-73398,73400-73402,73404-73405,73409,73415,73417-73423,73425,73432-73433,73435-73436,73439,73441,73445,73447-73448,73451,73457,73459-73463,73465,73471-73472,73480 via svnmerge from 
svn+ssh://pythondev/python/trunk

................
  r73278 | benjamin.peterson | 2009-06-07 19:33:11 -0300 (Sun, 07 Jun 2009) | 1 line
  
  inherit from object
................
  r73279 | benjamin.peterson | 2009-06-07 19:35:00 -0300 (Sun, 07 Jun 2009) | 1 line
  
  always inherit from an appropiate base class
................
  r73280 | benjamin.peterson | 2009-06-07 19:54:35 -0300 (Sun, 07 Jun 2009) | 1 line
  
  use booleans for flags
................
  r73281 | benjamin.peterson | 2009-06-07 19:55:36 -0300 (Sun, 07 Jun 2009) | 1 line
  
  remove has_key
................
  r73282 | benjamin.peterson | 2009-06-07 20:12:44 -0300 (Sun, 07 Jun 2009) | 1 line
  
  backport r73273
................
  r73286 | georg.brandl | 2009-06-08 04:57:35 -0300 (Mon, 08 Jun 2009) | 1 line
  
  Remove period from end of headings.
................
  r73294 | georg.brandl | 2009-06-08 10:34:52 -0300 (Mon, 08 Jun 2009) | 1 line
  
  #6194: O_SHLOCK/O_EXLOCK are not really more platform independent than lockf().
................
  r73296 | georg.brandl | 2009-06-08 13:03:41 -0300 (Mon, 08 Jun 2009) | 1 line
  
  #6238: add fillchar to string.just function family.
................
  r73299 | georg.brandl | 2009-06-08 15:41:36 -0300 (Mon, 08 Jun 2009) | 1 line
  
  Typo fix.
................
  r73303 | ronald.oussoren | 2009-06-08 17:54:59 -0300 (Mon, 08 Jun 2009) | 11 lines
  
  This checkin adds a symlink to the lib directory of a framework install
  of Python (on OSX), and the end result of that is that the combination of
  ``python-config --ldflags`` and ``python-config --libs`` refers to an actually
  existing location.
  
  I've done this in preference to changing python-config to specify 
  '-framework Python' for linking because that doesn't work when you have multiple
  versions of python installed (because '-framework Python' will always link to
  the 'Current' version of the framework, without a possibility to specify a
  specific version).
................
  r73305 | ronald.oussoren | 2009-06-08 18:12:41 -0300 (Mon, 08 Jun 2009) | 4 lines
  
  This is a fix for Issue5809: you shouldn't specify both --enable-framework and
  --enable-shared
................
  r73308 | benjamin.peterson | 2009-06-08 19:18:32 -0300 (Mon, 08 Jun 2009) | 1 line
  
  remove useless assertion
................
  r73312 | benjamin.peterson | 2009-06-08 20:44:13 -0300 (Mon, 08 Jun 2009) | 1 line
  
  remove error checks already done in set_context()
................
  r73313 | r.david.murray | 2009-06-08 21:44:22 -0300 (Mon, 08 Jun 2009) | 4 lines
  
  Issue 2947: document how return code handling translates from
  os.popen to subprocess.  Also fixes reference link in the
  os.spawn documentation.
................
  r73314 | eric.smith | 2009-06-09 09:38:08 -0300 (Tue, 09 Jun 2009) | 1 line
  
  Restored a test that was erroneously removed. See issue 6198.
................
  r73317 | benjamin.peterson | 2009-06-09 14:24:26 -0300 (Tue, 09 Jun 2009) | 1 line
  
  make ast.c depend on the grammar
................
  r73318 | benjamin.peterson | 2009-06-09 14:29:51 -0300 (Tue, 09 Jun 2009) | 1 line
  
  explain why keyword names are not just NAME
................
  r73321 | benjamin.peterson | 2009-06-09 18:13:43 -0300 (Tue, 09 Jun 2009) | 1 line
  
  update symbol.py from with statement changes
................
  r73324 | amaury.forgeotdarc | 2009-06-09 19:53:16 -0300 (Tue, 09 Jun 2009) | 2 lines
  
  Avoid invoking the parser/compiler just to test the presence of a function.
................
  r73325 | amaury.forgeotdarc | 2009-06-09 20:08:13 -0300 (Tue, 09 Jun 2009) | 8 lines
  
  #6201: Fix test_winreg on Windows:
  since the introduction of the SETUP_WITH opcode,
  __enter__ and __exit__ methods must belong to the type,
  and are not retrieved at the instance level (__dict__ or __getattr__).
  
  Add a note in whatsnew about this incompatibility;
  old style classes are not affected.
................
  r73326 | amaury.forgeotdarc | 2009-06-09 20:18:50 -0300 (Tue, 09 Jun 2009) | 2 lines
  
  Both kind of types are concerned.
................
  r73328 | amaury.forgeotdarc | 2009-06-09 20:37:11 -0300 (Tue, 09 Jun 2009) | 3 lines
  
  Missing import in test_curses, uncovered by some buildbots.
  (There are still a few test files that don't use the standard layout)
................
  r73331 | benjamin.peterson | 2009-06-10 10:45:31 -0300 (Wed, 10 Jun 2009) | 1 line
  
  fix spelling
................
  r73334 | raymond.hettinger | 2009-06-10 13:15:02 -0300 (Wed, 10 Jun 2009) | 1 line
  
  Issue 6256: Fix stacklevel in warning message.
................
  r73335 | raymond.hettinger | 2009-06-10 13:15:40 -0300 (Wed, 10 Jun 2009) | 1 line
  
  Fix signed/unsigned compiler warning.
................
  r73336 | tarek.ziade | 2009-06-10 15:49:50 -0300 (Wed, 10 Jun 2009) | 1 line
  
  Distutils: started code cleanup and test coverage for cygwinccompiler
................
  r73340 | amaury.forgeotdarc | 2009-06-10 17:30:19 -0300 (Wed, 10 Jun 2009) | 2 lines
  
  Fix a typo spotted by Nick Coghlan.
................
  r73341 | tarek.ziade | 2009-06-11 05:12:20 -0300 (Thu, 11 Jun 2009) | 1 line
  
  Fixed #5201: now distutils.sysconfig.parse_makefile() understands '53264' in Makefiles
................
  r73345 | tarek.ziade | 2009-06-11 05:43:26 -0300 (Thu, 11 Jun 2009) | 1 line
  
  removed the last string.split() call
................
  r73348 | tarek.ziade | 2009-06-11 06:13:36 -0300 (Thu, 11 Jun 2009) | 1 line
  
  #6263 fixed syntax error in distutils.cygwinccompiler
................
  r73350 | vinay.sajip | 2009-06-11 06:23:41 -0300 (Thu, 11 Jun 2009) | 1 line
  
  Issue #5262: Fixed bug in next roll over time computation in TimedRotatingFileHandler.
................
  r73353 | vinay.sajip | 2009-06-11 06:53:35 -0300 (Thu, 11 Jun 2009) | 1 line
  
  Issue #5262: Improved fix.
................
  r73354 | tarek.ziade | 2009-06-11 06:55:09 -0300 (Thu, 11 Jun 2009) | 1 line
  
  pep8-fied cygwinccompiler module
................
  r73361 | benjamin.peterson | 2009-06-11 13:25:52 -0300 (Thu, 11 Jun 2009) | 1 line
  
  remove duplicate check
................
  r73362 | benjamin.peterson | 2009-06-11 14:49:38 -0300 (Thu, 11 Jun 2009) | 1 line
  
  revert r73361
................
  r73363 | benjamin.peterson | 2009-06-11 14:51:17 -0300 (Thu, 11 Jun 2009) | 1 line
  
  use multi-with syntax
................
  r73367 | raymond.hettinger | 2009-06-11 19:04:00 -0300 (Thu, 11 Jun 2009) | 1 line
  
  Add example of how to do key lookups with bisect().
................
  r73370 | benjamin.peterson | 2009-06-11 19:06:46 -0300 (Thu, 11 Jun 2009) | 105 lines
  
  Merged revisions 72523,72950-72951,72994,73003,73033,73036-73040,73091-73093,73096,73179-73181,73192,73231,73244,73255-73256,73365 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
  
  ........
    r72523 | benjamin.peterson | 2009-05-09 14:42:26 -0500 (Sat, 09 May 2009) | 1 line
    
    remove parenthesis
  ........
    r72950 | benjamin.peterson | 2009-05-26 18:19:45 -0500 (Tue, 26 May 2009) | 1 line
    
    remove unused imports
  ........
    r72951 | benjamin.peterson | 2009-05-26 18:27:00 -0500 (Tue, 26 May 2009) | 1 line
    
    this is no longer executable
  ........
    r72994 | benjamin.peterson | 2009-05-28 15:32:54 -0500 (Thu, 28 May 2009) | 1 line
    
    fix test_all_fixers on Windows #6134
  ........
    r73003 | benjamin.peterson | 2009-05-28 21:57:28 -0500 (Thu, 28 May 2009) | 4 lines
    
    make 2to3 test utilities easier to use with other applications (3to2)
    
    Patch by Joe Amenta
  ........
    r73033 | benjamin.peterson | 2009-05-29 16:58:32 -0500 (Fri, 29 May 2009) | 1 line
    
    update grammar for multi with statement
  ........
    r73036 | benjamin.peterson | 2009-05-29 17:33:20 -0500 (Fri, 29 May 2009) | 1 line
    
    simplify fix_unicode
  ........
    r73037 | benjamin.peterson | 2009-05-29 17:53:03 -0500 (Fri, 29 May 2009) | 1 line
    
    add custom error for pattern syntax errors
  ........
    r73038 | benjamin.peterson | 2009-05-29 17:55:00 -0500 (Fri, 29 May 2009) | 1 line
    
    complain if details are attached to a token
  ........
    r73039 | benjamin.peterson | 2009-05-29 18:00:28 -0500 (Fri, 29 May 2009) | 1 line
    
    add a test for whitespace
  ........
    r73040 | benjamin.peterson | 2009-05-29 18:01:17 -0500 (Fri, 29 May 2009) | 1 line
    
    a fix for emacs highlighting
  ........
    r73091 | benjamin.peterson | 2009-05-31 20:55:25 -0500 (Sun, 31 May 2009) | 1 line
    
    deprecate set_prefix() and get_prefix() in favor of a prefix property
  ........
    r73092 | benjamin.peterson | 2009-05-31 21:00:51 -0500 (Sun, 31 May 2009) | 1 line
    
    change hideous java naming scheme
  ........
    r73093 | benjamin.peterson | 2009-05-31 21:01:39 -0500 (Sun, 31 May 2009) | 1 line
    
    remove dated comment
  ........
    r73096 | benjamin.peterson | 2009-05-31 21:40:53 -0500 (Sun, 31 May 2009) | 1 line
    
    group tests
  ........
    r73179 | benjamin.peterson | 2009-06-03 13:09:53 -0500 (Wed, 03 Jun 2009) | 1 line
    
    handle the case where there's multiple trailers #6185
  ........
    r73180 | benjamin.peterson | 2009-06-03 13:18:05 -0500 (Wed, 03 Jun 2009) | 1 line
    
    scrap __main__ section
  ........
    r73181 | benjamin.peterson | 2009-06-03 13:24:48 -0500 (Wed, 03 Jun 2009) | 1 line
    
    remove shebang lines and __main__ sections
  ........
    r73192 | benjamin.peterson | 2009-06-03 19:16:30 -0500 (Wed, 03 Jun 2009) | 4 lines
    
    actually test something here
    
    Thanks to Joe Amenta for noticing.y
  ........
    r73231 | benjamin.peterson | 2009-06-04 13:38:50 -0500 (Thu, 04 Jun 2009) | 1 line
    
    remove unused variable
  ........
    r73244 | benjamin.peterson | 2009-06-05 08:39:25 -0500 (Fri, 05 Jun 2009) | 1 line
    
    allow fixers to give different options in setUp
  ........
    r73255 | benjamin.peterson | 2009-06-06 11:23:46 -0500 (Sat, 06 Jun 2009) | 1 line
    
    fix the except fixer on one line suites #6222
  ........
    r73256 | benjamin.peterson | 2009-06-06 11:27:40 -0500 (Sat, 06 Jun 2009) | 1 line
    
    test one-line else and finally clauses
  ........
    r73365 | benjamin.peterson | 2009-06-11 17:01:32 -0500 (Thu, 11 Jun 2009) | 1 line
    
    normalize whitespace
  ........
................
  r73372 | raymond.hettinger | 2009-06-11 19:08:10 -0300 (Thu, 11 Jun 2009) | 1 line
  
  Move comment to correct line.
................
  r73376 | benjamin.peterson | 2009-06-11 19:29:23 -0300 (Thu, 11 Jun 2009) | 1 line
  
  remove check for case handled in sub-function
................
  r73382 | raymond.hettinger | 2009-06-11 20:14:53 -0300 (Thu, 11 Jun 2009) | 1 line
  
  Issue 6261: Clarify behavior of random.uniform().
................
  r73390 | martin.v.loewis | 2009-06-12 14:28:31 -0300 (Fri, 12 Jun 2009) | 3 lines
  
  Support AMD64 in msilib. Set Win64 on reglocator.
  Fixes #6258.
................
  r73393 | alexandre.vassalotti | 2009-06-12 15:56:57 -0300 (Fri, 12 Jun 2009) | 2 lines
  
  Clear reference to the static PyExc_RecursionErrorInst in _PyExc_Fini.
................
  r73394 | antoine.pitrou | 2009-06-12 17:14:08 -0300 (Fri, 12 Jun 2009) | 3 lines
  
  Issue #6215: backport the 3.1 io lib
................
  r73395 | antoine.pitrou | 2009-06-12 17:36:25 -0300 (Fri, 12 Jun 2009) | 4 lines
  
  Restore the old test_file.py (for the builtin file object) as a new file named test_file2k.py
................
  r73396 | antoine.pitrou | 2009-06-12 17:41:52 -0300 (Fri, 12 Jun 2009) | 4 lines
  
  Try to restore the old test_file and test_univnewlines as new, different files
  (with the right revisions this time, hopefully)
................
  r73397 | antoine.pitrou | 2009-06-12 17:54:21 -0300 (Fri, 12 Jun 2009) | 3 lines
  
  Re-enable testing of builtin open() in test_bufio in test_largefile
................
  r73398 | alexandre.vassalotti | 2009-06-12 17:57:12 -0300 (Fri, 12 Jun 2009) | 3 lines
  
  Add const qualifier to PyErr_SetFromErrnoWithFilename and to
  PyErr_SetFromErrnoWithUnicodeFilename.
................
  r73400 | alexandre.vassalotti | 2009-06-12 18:43:47 -0300 (Fri, 12 Jun 2009) | 2 lines
  
  Delete outdated make file for building the parser with MSVC 6.
................
  r73401 | alexandre.vassalotti | 2009-06-12 18:52:14 -0300 (Fri, 12 Jun 2009) | 2 lines
  
  Make pickling of OrderedDict instances more efficient.
................
  r73402 | alexandre.vassalotti | 2009-06-12 20:03:35 -0300 (Fri, 12 Jun 2009) | 6 lines
  
  Revert r73401 per Raymond Hettinger's request.
  
  The rational is the change might cause imcompatiblity problems with
  PyYAML. In addition, Raymond wants to kept the different versions of
  collections synchronized across Python versions.
................
  r73404 | benjamin.peterson | 2009-06-12 22:40:00 -0300 (Fri, 12 Jun 2009) | 1 line
  
  keep the slice.step field as NULL if no step expression is given
................
  r73405 | benjamin.peterson | 2009-06-13 00:46:30 -0300 (Sat, 13 Jun 2009) | 1 line
  
  prevent import statements from assigning to None
................
  r73409 | benjamin.peterson | 2009-06-13 10:06:21 -0300 (Sat, 13 Jun 2009) | 1 line
  
  allow importing from a module named None if it has an 'as' clause
................
  r73415 | benjamin.peterson | 2009-06-13 11:25:08 -0300 (Sat, 13 Jun 2009) | 1 line
  
  use 'rc' for release candidates for consistency
................
  r73417 | benjamin.peterson | 2009-06-13 12:42:23 -0300 (Sat, 13 Jun 2009) | 1 line
  
  special case release candidates
................
  r73418 | benjamin.peterson | 2009-06-13 12:48:04 -0300 (Sat, 13 Jun 2009) | 1 line
  
  handle different rc format
................
  r73419 | benjamin.peterson | 2009-06-13 13:19:19 -0300 (Sat, 13 Jun 2009) | 1 line
  
  set Print.values to NULL if there are no values
................
  r73420 | benjamin.peterson | 2009-06-13 14:08:53 -0300 (Sat, 13 Jun 2009) | 1 line
  
  give a better error message when deleting ()
................
  r73421 | benjamin.peterson | 2009-06-13 17:23:33 -0300 (Sat, 13 Jun 2009) | 1 line
  
  when no module is given in a 'from' relative import, make ImportFrom.module NULL
................
  r73422 | benjamin.peterson | 2009-06-13 17:30:48 -0300 (Sat, 13 Jun 2009) | 1 line
  
  update ast version
................
  r73423 | hirokazu.yamamoto | 2009-06-14 00:05:54 -0300 (Sun, 14 Jun 2009) | 1 line
  
  Updated MSVC files to follow r73394.
................
  r73425 | hirokazu.yamamoto | 2009-06-14 00:53:55 -0300 (Sun, 14 Jun 2009) | 2 lines
  
  Issue #6271: mmap tried to close invalid file handle (-1) when annonymous.
  (On Unix) Patch by STINNER Victor.
................
  r73432 | amaury.forgeotdarc | 2009-06-14 18:20:40 -0300 (Sun, 14 Jun 2009) | 3 lines
  
  #6227: Because of a wrong indentation, the test was not testing what it should.
  Ensure that the snippet in doctest_aliases actually contains aliases.
................
  r73433 | benjamin.peterson | 2009-06-14 19:36:48 -0300 (Sun, 14 Jun 2009) | 1 line
  
  backport r73430
................
  r73435 | tarek.ziade | 2009-06-15 20:04:29 -0300 (Mon, 15 Jun 2009) | 1 line
  
  code cleanup
................
  r73436 | tarek.ziade | 2009-06-15 20:30:13 -0300 (Mon, 15 Jun 2009) | 1 line
  
  Issue #6286: distutils upload command now uses urllib2
................
  r73439 | benjamin.peterson | 2009-06-15 21:29:31 -0300 (Mon, 15 Jun 2009) | 1 line
  
  don't mask encoding errors when decoding a string #6289
................
  r73441 | tarek.ziade | 2009-06-16 04:29:52 -0300 (Tue, 16 Jun 2009) | 1 line
  
  Fixed #6287: documentation for the license field in distutils
................
  r73445 | tarek.ziade | 2009-06-16 05:31:01 -0300 (Tue, 16 Jun 2009) | 1 line
  
  starting distutils.ccompiler test coverage and cleanup
................
  r73447 | georg.brandl | 2009-06-16 14:41:33 -0300 (Tue, 16 Jun 2009) | 1 line
  
  Add tabularcolumns directive for tables with bullet lists in them.
................
  r73448 | georg.brandl | 2009-06-16 14:43:44 -0300 (Tue, 16 Jun 2009) | 1 line
  
  Remove unused macro.
................
  r73451 | mark.dickinson | 2009-06-16 17:31:12 -0300 (Tue, 16 Jun 2009) | 1 line
  
  Acknowledge the role of the MPFR library in creating cmath_testcases.txt
................
  r73457 | benjamin.peterson | 2009-06-16 20:13:09 -0300 (Tue, 16 Jun 2009) | 1 line
  
  add underscores
................
  r73459 | raymond.hettinger | 2009-06-16 22:43:47 -0300 (Tue, 16 Jun 2009) | 1 line
  
  Add usage note.
................
  r73460 | benjamin.peterson | 2009-06-17 00:23:04 -0300 (Wed, 17 Jun 2009) | 1 line
  
  remove unused 'encoding' member from the compiler struct
................
  r73461 | hirokazu.yamamoto | 2009-06-17 04:05:33 -0300 (Wed, 17 Jun 2009) | 1 line
  
  Issue #6215: Fixed to use self.open() instead of open() or io.open().
................
  r73462 | georg.brandl | 2009-06-17 06:36:21 -0300 (Wed, 17 Jun 2009) | 1 line
  
  #6295: clarify blocking behavior of getch().
................
  r73463 | georg.brandl | 2009-06-17 06:43:31 -0300 (Wed, 17 Jun 2009) | 1 line
  
  #6255: document PyInt_FromSize_t.
................
  r73465 | nick.coghlan | 2009-06-17 09:12:15 -0300 (Wed, 17 Jun 2009) | 1 line
  
  Issue 6288: update the contextlib.nested() docs to explain why it has been deprecated and should generally be avoided
................
  r73471 | georg.brandl | 2009-06-18 19:24:26 -0300 (Thu, 18 Jun 2009) | 1 line
  
  #6276: Remove usage of nested() in favor of new with statement with multiple managers.
................
  r73472 | amaury.forgeotdarc | 2009-06-18 19:32:50 -0300 (Thu, 18 Jun 2009) | 5 lines
  
  #6189: The subprocess.py module should be kept compatible with python 2.2
  
  (On windows, you still have to change one line to use pywin32 
  instead of the _subprocess helper module)
................
  r73480 | facundo.batista | 2009-06-19 15:02:28 -0300 (Fri, 19 Jun 2009) | 3 lines
  
  Issue #6274. Fixed a potential FD leak in subprocess.py.
................


Added:
   python/branches/tk_and_idle_maintenance/Lib/_pyio.py
      - copied unchanged from r73480, /python/trunk/Lib/_pyio.py
   python/branches/tk_and_idle_maintenance/Lib/distutils/tests/test_ccompiler.py
      - copied unchanged from r73480, /python/trunk/Lib/distutils/tests/test_ccompiler.py
   python/branches/tk_and_idle_maintenance/Lib/distutils/tests/test_cygwinccompiler.py
      - copied unchanged from r73480, /python/trunk/Lib/distutils/tests/test_cygwinccompiler.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_file2k.py
      - copied unchanged from r73480, /python/trunk/Lib/test/test_file2k.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_univnewlines2k.py
      - copied unchanged from r73480, /python/trunk/Lib/test/test_univnewlines2k.py
   python/branches/tk_and_idle_maintenance/Modules/_io/
      - copied from r73480, /python/trunk/Modules/_io/
Removed:
   python/branches/tk_and_idle_maintenance/Modules/_bytesio.c
   python/branches/tk_and_idle_maintenance/Modules/_fileio.c
   python/branches/tk_and_idle_maintenance/Parser/grammar.mak
Modified:
   python/branches/tk_and_idle_maintenance/   (props changed)
   python/branches/tk_and_idle_maintenance/Doc/c-api/int.rst
   python/branches/tk_and_idle_maintenance/Doc/distutils/setupscript.rst
   python/branches/tk_and_idle_maintenance/Doc/library/bisect.rst
   python/branches/tk_and_idle_maintenance/Doc/library/cgi.rst
   python/branches/tk_and_idle_maintenance/Doc/library/contextlib.rst
   python/branches/tk_and_idle_maintenance/Doc/library/ctypes.rst
   python/branches/tk_and_idle_maintenance/Doc/library/curses.panel.rst
   python/branches/tk_and_idle_maintenance/Doc/library/curses.rst
   python/branches/tk_and_idle_maintenance/Doc/library/fcntl.rst
   python/branches/tk_and_idle_maintenance/Doc/library/io.rst
   python/branches/tk_and_idle_maintenance/Doc/library/itertools.rst
   python/branches/tk_and_idle_maintenance/Doc/library/os.rst
   python/branches/tk_and_idle_maintenance/Doc/library/pickletools.rst
   python/branches/tk_and_idle_maintenance/Doc/library/platform.rst
   python/branches/tk_and_idle_maintenance/Doc/library/random.rst
   python/branches/tk_and_idle_maintenance/Doc/library/string.rst
   python/branches/tk_and_idle_maintenance/Doc/library/subprocess.rst
   python/branches/tk_and_idle_maintenance/Doc/library/ttk.rst
   python/branches/tk_and_idle_maintenance/Doc/tools/sphinxext/patchlevel.py
   python/branches/tk_and_idle_maintenance/Doc/whatsnew/2.7.rst
   python/branches/tk_and_idle_maintenance/Grammar/Grammar
   python/branches/tk_and_idle_maintenance/Include/pyerrors.h
   python/branches/tk_and_idle_maintenance/Lib/contextlib.py
   python/branches/tk_and_idle_maintenance/Lib/distutils/ccompiler.py
   python/branches/tk_and_idle_maintenance/Lib/distutils/command/bdist_msi.py
   python/branches/tk_and_idle_maintenance/Lib/distutils/command/upload.py
   python/branches/tk_and_idle_maintenance/Lib/distutils/cygwinccompiler.py
   python/branches/tk_and_idle_maintenance/Lib/distutils/sysconfig.py
   python/branches/tk_and_idle_maintenance/Lib/distutils/tests/test_sysconfig.py
   python/branches/tk_and_idle_maintenance/Lib/distutils/tests/test_upload.py
   python/branches/tk_and_idle_maintenance/Lib/filecmp.py
   python/branches/tk_and_idle_maintenance/Lib/idlelib/EditorWindow.py
   python/branches/tk_and_idle_maintenance/Lib/io.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/   (props changed)
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/Grammar.txt
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixer_base.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixer_util.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_apply.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_basestring.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_buffer.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_callable.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_dict.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_except.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_exec.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_execfile.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_filter.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_funcattrs.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_future.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_getcwdu.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_has_key.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_idioms.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_import.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_imports.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_input.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_intern.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_isinstance.py   (contents, props changed)
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_itertools.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_itertools_imports.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_long.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_map.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_metaclass.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_methodattrs.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_ne.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_next.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_nonzero.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_numliterals.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_paren.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_print.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_raise.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_raw_input.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_reduce.py   (props changed)
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_renames.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_repr.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_set_literal.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_standarderror.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_sys_exc.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_throw.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_tuple_params.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_types.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_unicode.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_urllib.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_ws_comma.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_xrange.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_xreadlines.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_zip.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/patcomp.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/pytree.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/refactor.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/data/README   (props changed)
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/data/different_encoding.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/data/fixers/myfixes/fix_parrot.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/data/py2_test_grammar.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/data/py3_test_grammar.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/pytree_idempotency.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/support.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_all_fixers.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_fixers.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_parser.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_pytree.py
   python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_util.py
   python/branches/tk_and_idle_maintenance/Lib/logging/handlers.py
   python/branches/tk_and_idle_maintenance/Lib/msilib/__init__.py
   python/branches/tk_and_idle_maintenance/Lib/multiprocessing/queues.py
   python/branches/tk_and_idle_maintenance/Lib/os.py
   python/branches/tk_and_idle_maintenance/Lib/random.py
   python/branches/tk_and_idle_maintenance/Lib/subprocess.py
   python/branches/tk_and_idle_maintenance/Lib/symbol.py
   python/branches/tk_and_idle_maintenance/Lib/test/cmath_testcases.txt
   python/branches/tk_and_idle_maintenance/Lib/test/doctest_aliases.py
   python/branches/tk_and_idle_maintenance/Lib/test/formatfloat_testcases.txt
   python/branches/tk_and_idle_maintenance/Lib/test/test_ast.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_bufio.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_coding.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_compile.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_curses.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_doctest.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_file.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_fileio.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_generators.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_genexps.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_io.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_largefile.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_memoryio.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_signal.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_support.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_syntax.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_univnewlines.py
   python/branches/tk_and_idle_maintenance/Lib/test/test_winreg.py
   python/branches/tk_and_idle_maintenance/Makefile.pre.in
   python/branches/tk_and_idle_maintenance/Misc/NEWS
   python/branches/tk_and_idle_maintenance/Modules/audioop.c
   python/branches/tk_and_idle_maintenance/Modules/mmapmodule.c
   python/branches/tk_and_idle_maintenance/Objects/exceptions.c
   python/branches/tk_and_idle_maintenance/Objects/floatobject.c
   python/branches/tk_and_idle_maintenance/PC/VC6/pythoncore.dsp
   python/branches/tk_and_idle_maintenance/PC/VS7.1/pythoncore.vcproj
   python/branches/tk_and_idle_maintenance/PC/VS8.0/pythoncore.vcproj
   python/branches/tk_and_idle_maintenance/PC/_winreg.c
   python/branches/tk_and_idle_maintenance/PC/config.c
   python/branches/tk_and_idle_maintenance/PCbuild/pythoncore.vcproj
   python/branches/tk_and_idle_maintenance/Parser/Python.asdl
   python/branches/tk_and_idle_maintenance/Parser/asdl.py
   python/branches/tk_and_idle_maintenance/Parser/asdl_c.py
   python/branches/tk_and_idle_maintenance/Parser/tokenizer.c
   python/branches/tk_and_idle_maintenance/Python/Python-ast.c
   python/branches/tk_and_idle_maintenance/Python/ast.c
   python/branches/tk_and_idle_maintenance/Python/compile.c
   python/branches/tk_and_idle_maintenance/Python/errors.c
   python/branches/tk_and_idle_maintenance/Tools/msi/msi.py
   python/branches/tk_and_idle_maintenance/configure
   python/branches/tk_and_idle_maintenance/configure.in
   python/branches/tk_and_idle_maintenance/setup.py

Modified: python/branches/tk_and_idle_maintenance/Doc/c-api/int.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/c-api/int.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/c-api/int.rst	Sat Jun 20 00:11:15 2009
@@ -68,6 +68,15 @@
 
 .. cfunction:: PyObject* PyInt_FromSsize_t(Py_ssize_t ival)
 
+   Create a new integer object with a value of *ival*. If the value is larger
+   than ``LONG_MAX`` or smaller than ``LONG_MIN``, a long integer object is
+   returned.
+
+   .. versionadded:: 2.5
+
+
+.. cfunction:: PyObject* PyInt_FromSize_t(size_t ival)
+
    Create a new integer object with a value of *ival*. If the value exceeds
    ``LONG_MAX``, a long integer object is returned.
 

Modified: python/branches/tk_and_idle_maintenance/Doc/distutils/setupscript.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/distutils/setupscript.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/distutils/setupscript.rst	Sat Jun 20 00:11:15 2009
@@ -590,6 +590,8 @@
 +----------------------+---------------------------+-----------------+--------+
 | ``platforms``        | a list of platforms       | list of strings |        |
 +----------------------+---------------------------+-----------------+--------+
+| ``license``          | license for the package   | short string    | \(6)   |
++----------------------+---------------------------+-----------------+--------+
 
 Notes:
 
@@ -611,6 +613,13 @@
     The ``long_description`` field is used by PyPI when you are registering a
     package, to build its home page.
 
+(6)
+    The ``license`` field is a text indicating the license covering the
+    package where the license is not a selection from the "License" Trove
+    classifiers. See the ``Classifier`` field. Notice that
+    there's a ``licence`` distribution option which is deprecated but still
+    acts as an alias for ``license``.
+
 'short string'
     A single line of text, not more than 200 characters.
 

Modified: python/branches/tk_and_idle_maintenance/Doc/library/bisect.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/library/bisect.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/library/bisect.rst	Sat Jun 20 00:11:15 2009
@@ -85,4 +85,22 @@
    >>> map(grade, [33, 99, 77, 44, 12, 88])
    ['E', 'A', 'B', 'D', 'F', 'A']
 
+Unlike the :func:`sorted` function, it does not make sense for the :func:`bisect`
+functions to have *key* or *reversed* arguments because that would lead to an
+inefficent design (successive calls to bisect functions would not "remember"
+all of the previous key lookups).
 
+Instead, it is better to search a list of precomputed keys to find the index
+of the record in question::
+
+    >>> data = [('red', 5), ('blue', 1), ('yellow', 8), ('black', 0)]
+    >>> data.sort(key=lambda r: r[1])
+    >>> keys = [r[1] for r in data]         # precomputed list of keys
+    >>> data[bisect_left(keys, 0)]
+    ('black', 0)
+    >>> data[bisect_left(keys, 1)]
+    ('blue', 1)
+    >>> data[bisect_left(keys, 5)]
+    ('red', 5)
+    >>> data[bisect_left(keys, 8)]
+    ('yellow', 8)

Modified: python/branches/tk_and_idle_maintenance/Doc/library/cgi.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/library/cgi.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/library/cgi.rst	Sat Jun 20 00:11:15 2009
@@ -1,6 +1,5 @@
-
-:mod:`cgi` --- Common Gateway Interface support.
-================================================
+:mod:`cgi` --- Common Gateway Interface support
+===============================================
 
 .. module:: cgi
    :synopsis: Helpers for running Python scripts via the Common Gateway Interface.

Modified: python/branches/tk_and_idle_maintenance/Doc/library/contextlib.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/library/contextlib.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/library/contextlib.rst	Sat Jun 20 00:11:15 2009
@@ -1,6 +1,5 @@
-
-:mod:`contextlib` --- Utilities for :keyword:`with`\ -statement contexts.
-=========================================================================
+:mod:`contextlib` --- Utilities for :keyword:`with`\ -statement contexts
+========================================================================
 
 .. module:: contextlib
    :synopsis: Utilities for with-statement contexts.
@@ -59,21 +58,18 @@
 
    Combine multiple context managers into a single nested context manager.
 
-   Code like this::
+   This function has been deprecated in favour of the multiple manager form
+   of the :keyword:`with` statement.
+
+   The one advantage of this function over the multiple manager form of the
+   :keyword:`with` statement is that argument unpacking allows it to be
+   used with a variable number of context managers as follows::
 
       from contextlib import nested
 
-      with nested(A(), B(), C()) as (X, Y, Z):
+      with nested(*managers):
           do_something()
 
-   is equivalent to this::
-
-      m1, m2, m3 = A(), B(), C()
-      with m1 as X:
-          with m2 as Y:
-              with m3 as Z:
-                  do_something()
-
    Note that if the :meth:`__exit__` method of one of the nested context managers
    indicates an exception should be suppressed, no exception information will be
    passed to any remaining outer context managers. Similarly, if the
@@ -83,8 +79,28 @@
    :meth:`__exit__` methods should avoid raising exceptions, and in particular they
    should not re-raise a passed-in exception.
 
+   This function has two major quirks that have led to it being deprecated. Firstly,
+   as the context managers are all constructed before the function is invoked, the
+   :meth:`__new__` and :meth:`__init__` methods of the inner context managers are
+   not actually covered by the scope of the outer context managers. That means, for
+   example, that using :func:`nested` to open two files is a programming error as the
+   first file will not be closed promptly if an exception is thrown when opening
+   the second file.
+
+   Secondly, if the :meth:`__enter__` method of one of the inner context managers
+   raises an exception that is caught and suppressed by the :meth:`__exit__` method
+   of one of the outer context managers, this construct will raise
+   :exc:`RuntimeError` rather than skipping the body of the :keyword:`with`
+   statement.
+
+   Developers that need to support nesting of a variable number of context managers
+   can either use the :mod:`warnings` module to suppress the DeprecationWarning
+   raised by this function or else use this function as a model for an application
+   specific implementation.
+
    .. deprecated:: 2.7
-      The with-statement now supports this functionality directly.
+      The with-statement now supports this functionality directly (without the
+      confusing error prone quirks).
 
 .. function:: closing(thing)
 

Modified: python/branches/tk_and_idle_maintenance/Doc/library/ctypes.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/library/ctypes.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/library/ctypes.rst	Sat Jun 20 00:11:15 2009
@@ -1,6 +1,5 @@
-
-:mod:`ctypes` --- A foreign function library for Python.
-========================================================
+:mod:`ctypes` --- A foreign function library for Python
+=======================================================
 
 .. module:: ctypes
    :synopsis: A foreign function library for Python.

Modified: python/branches/tk_and_idle_maintenance/Doc/library/curses.panel.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/library/curses.panel.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/library/curses.panel.rst	Sat Jun 20 00:11:15 2009
@@ -1,6 +1,5 @@
-
-:mod:`curses.panel` --- A panel stack extension for curses.
-===========================================================
+:mod:`curses.panel` --- A panel stack extension for curses
+==========================================================
 
 .. module:: curses.panel
    :synopsis: A panel stack extension that adds depth to  curses windows.

Modified: python/branches/tk_and_idle_maintenance/Doc/library/curses.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/library/curses.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/library/curses.rst	Sat Jun 20 00:11:15 2009
@@ -796,7 +796,8 @@
 
    Get a character. Note that the integer returned does *not* have to be in ASCII
    range: function keys, keypad keys and so on return numbers higher than 256. In
-   no-delay mode, -1 is returned if there is  no input.
+   no-delay mode, -1 is returned if there is no input, else :func:`getch` waits
+   until a key is pressed.
 
 
 .. method:: window.getkey([y, x])

Modified: python/branches/tk_and_idle_maintenance/Doc/library/fcntl.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/library/fcntl.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/library/fcntl.rst	Sat Jun 20 00:11:15 2009
@@ -151,7 +151,6 @@
 
    Module :mod:`os`
       If the locking flags :const:`O_SHLOCK` and :const:`O_EXLOCK` are present
-      in the :mod:`os` module, the :func:`os.open` function provides a more
-      platform-independent alternative to the :func:`lockf` and :func:`flock`
-      functions.
+      in the :mod:`os` module (on BSD only), the :func:`os.open` function
+      provides an alternative to the :func:`lockf` and :func:`flock` functions.
 

Modified: python/branches/tk_and_idle_maintenance/Doc/library/io.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/library/io.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/library/io.rst	Sat Jun 20 00:11:15 2009
@@ -573,6 +573,10 @@
       The name of the encoding used to decode the stream's bytes into
       strings, and to encode strings into bytes.
 
+   .. attribute:: errors
+
+      The error setting of the decoder or encoder.
+
    .. attribute:: newlines
 
       A string, a tuple of strings, or ``None``, indicating the newlines
@@ -625,13 +629,9 @@
    If *line_buffering* is ``True``, :meth:`flush` is implied when a call to
    write contains a newline character.
 
-   :class:`TextIOWrapper` provides these data attributes in addition to those of
+   :class:`TextIOWrapper` provides one attribute in addition to those of
    :class:`TextIOBase` and its parents:
 
-   .. attribute:: errors
-
-      The encoding and decoding error setting.
-
    .. attribute:: line_buffering
 
       Whether line buffering is enabled.

Modified: python/branches/tk_and_idle_maintenance/Doc/library/itertools.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/library/itertools.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/library/itertools.rst	Sat Jun 20 00:11:15 2009
@@ -245,6 +245,10 @@
               yield n
               n += step
 
+   When counting with floating point numbers, better accuracy can sometimes be
+   achieved by substituting multiplicative code such as: ``(start + step * i
+   for i in count())``.
+
    .. versionchanged:: 2.7
       added *step* argument and allowed non-integer arguments.
 

Modified: python/branches/tk_and_idle_maintenance/Doc/library/os.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/library/os.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/library/os.rst	Sat Jun 20 00:11:15 2009
@@ -1715,8 +1715,8 @@
 
    (Note that the :mod:`subprocess` module provides more powerful facilities for
    spawning new processes and retrieving their results; using that module is
-   preferable to using these functions.  Check specially the *Replacing Older
-   Functions with the subprocess Module* section in that documentation page.)
+   preferable to using these functions.  Check especially the
+   :ref:`subprocess-replacements` section.)
 
    If *mode* is :const:`P_NOWAIT`, this function returns the process id of the new
    process; if *mode* is :const:`P_WAIT`, returns the process's exit code if it

Modified: python/branches/tk_and_idle_maintenance/Doc/library/pickletools.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/library/pickletools.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/library/pickletools.rst	Sat Jun 20 00:11:15 2009
@@ -1,6 +1,5 @@
-
-:mod:`pickletools` --- Tools for pickle developers.
-===================================================
+:mod:`pickletools` --- Tools for pickle developers
+==================================================
 
 .. module:: pickletools
    :synopsis: Contains extensive comments about the pickle protocols and pickle-machine

Modified: python/branches/tk_and_idle_maintenance/Doc/library/platform.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/library/platform.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/library/platform.rst	Sat Jun 20 00:11:15 2009
@@ -1,6 +1,5 @@
-
-:mod:`platform` ---  Access to underlying platform's identifying data.
-======================================================================
+:mod:`platform` ---  Access to underlying platform's identifying data
+=====================================================================
 
 .. module:: platform
    :synopsis: Retrieves as much platform identifying data as possible.

Modified: python/branches/tk_and_idle_maintenance/Doc/library/random.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/library/random.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/library/random.rst	Sat Jun 20 00:11:15 2009
@@ -191,6 +191,8 @@
    Return a random floating point number *N* such that ``a <= N <= b`` for
    ``a <= b`` and ``b <= N <= a`` for ``b < a``.
 
+   The end-point value ``b`` may or may not be included in the range
+   depending on floating-point rounding in the equation ``a + (b-a) * random()``.
 
 .. function:: triangular(low, high, mode)
 

Modified: python/branches/tk_and_idle_maintenance/Doc/library/string.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/library/string.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/library/string.rst	Sat Jun 20 00:11:15 2009
@@ -829,14 +829,15 @@
    Return a copy of *s*, but with lower case letters converted to upper case.
 
 
-.. function:: ljust(s, width)
-              rjust(s, width)
-              center(s, width)
+.. function:: ljust(s, width[, fillchar])
+              rjust(s, width[, fillchar])
+              center(s, width[, fillchar])
 
    These functions respectively left-justify, right-justify and center a string in
    a field of given width.  They return a string that is at least *width*
-   characters wide, created by padding the string *s* with spaces until the given
-   width on the right, left or both sides.  The string is never truncated.
+   characters wide, created by padding the string *s* with the character *fillchar*
+   (default is a space) until the given width on the right, left or both sides.
+   The string is never truncated.
 
 
 .. function:: zfill(s, width)

Modified: python/branches/tk_and_idle_maintenance/Doc/library/subprocess.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/library/subprocess.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/library/subprocess.rst	Sat Jun 20 00:11:15 2009
@@ -392,8 +392,8 @@
    output = p2.communicate()[0]
 
 
-Replacing os.system()
-^^^^^^^^^^^^^^^^^^^^^
+Replacing :func:`os.system`
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 ::
 
@@ -420,8 +420,8 @@
        print >>sys.stderr, "Execution failed:", e
 
 
-Replacing the os.spawn family
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Replacing the :func:`os.spawn <os.spawnl>` family
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 P_NOWAIT example::
 
@@ -448,8 +448,8 @@
    Popen(["/bin/mycmd", "myarg"], env={"PATH": "/usr/bin"})
 
 
-Replacing os.popen, os.popen2, os.popen3
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Replacing :func:`os.popen`, :func:`os.popen2`, :func:`os.popen3`
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 ::
 
@@ -491,9 +491,23 @@
              stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True)
    (child_stdin, child_stdout_and_stderr) = (p.stdin, p.stdout)
 
+Return code handling translates as follows::
 
-Replacing functions from the popen2 module
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   pipe = os.popen(cmd, 'w')
+   ...
+   rc = pipe.close()
+   if  rc != None and rc % 256:
+       print "There were some errors"
+   ==>
+   process = Popen(cmd, 'w', stdin=PIPE)
+   ...
+   process.stdin.close()
+   if process.wait() != 0:
+       print "There were some errors"
+
+
+Replacing functions from the :mod:`popen2` module
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 .. note::
 

Modified: python/branches/tk_and_idle_maintenance/Doc/library/ttk.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/library/ttk.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/library/ttk.rst	Sat Jun 20 00:11:15 2009
@@ -160,6 +160,9 @@
 The following options are supported by labels, buttons and other button-like
 widgets.
 
+.. tabularcolumns:: |p{0.2\textwidth}|p{0.7\textwidth}|
+..
+
    +--------------+-----------------------------------------------------------+
    | option       | description                                               |
    +==============+===========================================================+
@@ -701,6 +704,9 @@
 
 This widget accepts the following specific options:
 
+.. tabularcolumns:: |p{0.2\textwidth}|p{0.7\textwidth}|
+..
+
    +----------------+--------------------------------------------------------+
    | option         | description                                            |
    +================+========================================================+

Modified: python/branches/tk_and_idle_maintenance/Doc/tools/sphinxext/patchlevel.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/tools/sphinxext/patchlevel.py	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/tools/sphinxext/patchlevel.py	Sat Jun 20 00:11:15 2009
@@ -41,7 +41,7 @@
     suffixes = {
         'PY_RELEASE_LEVEL_ALPHA': 'a',
         'PY_RELEASE_LEVEL_BETA':  'b',
-        'PY_RELEASE_LEVEL_GAMMA': 'c',
+        'PY_RELEASE_LEVEL_GAMMA': 'rc',
         }
     if level != 'PY_RELEASE_LEVEL_FINAL':
         release += suffixes[level] + str(int(d['PY_RELEASE_SERIAL']))

Modified: python/branches/tk_and_idle_maintenance/Doc/whatsnew/2.7.rst
==============================================================================
--- python/branches/tk_and_idle_maintenance/Doc/whatsnew/2.7.rst	(original)
+++ python/branches/tk_and_idle_maintenance/Doc/whatsnew/2.7.rst	Sat Jun 20 00:11:15 2009
@@ -669,7 +669,11 @@
 This section lists previously described changes and other bugfixes
 that may require changes to your code:
 
-To be written.
+* Because of an optimization for the :keyword:`with` statement, the special
+  methods :meth:`__enter__` and :meth:`__exit__` must belong to the object's
+  type, and cannot be directly attached to the object's instance.  This
+  affects new-style classes (derived from :class:`object`) and C extension
+  types.  (:issue:`6101`.)
 
 .. ======================================================================
 

Modified: python/branches/tk_and_idle_maintenance/Grammar/Grammar
==============================================================================
--- python/branches/tk_and_idle_maintenance/Grammar/Grammar	(original)
+++ python/branches/tk_and_idle_maintenance/Grammar/Grammar	Sat Jun 20 00:11:15 2009
@@ -133,7 +133,9 @@
 arglist: (argument ',')* (argument [',']
                          |'*' test (',' argument)* [',' '**' test] 
                          |'**' test)
-argument: test [gen_for] | test '=' test  # Really [keyword '='] test
+# The reason that keywords are test nodes instead of NAME is that using NAME
+# results in an ambiguity. ast.c makes sure it's a NAME.
+argument: test [gen_for] | test '=' test
 
 list_iter: list_for | list_if
 list_for: 'for' exprlist 'in' testlist_safe [list_iter]

Modified: python/branches/tk_and_idle_maintenance/Include/pyerrors.h
==============================================================================
--- python/branches/tk_and_idle_maintenance/Include/pyerrors.h	(original)
+++ python/branches/tk_and_idle_maintenance/Include/pyerrors.h	Sat Jun 20 00:11:15 2009
@@ -185,10 +185,11 @@
 PyAPI_FUNC(PyObject *) PyErr_SetFromErrno(PyObject *);
 PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilenameObject(
 	PyObject *, PyObject *);
-PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilename(PyObject *, char *);
+PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilename(
+	PyObject *, const char *);
 #ifdef MS_WINDOWS
 PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithUnicodeFilename(
-	PyObject *, Py_UNICODE *);
+	PyObject *, const Py_UNICODE *);
 #endif /* MS_WINDOWS */
 
 PyAPI_FUNC(PyObject *) PyErr_Format(PyObject *, const char *, ...)

Modified: python/branches/tk_and_idle_maintenance/Lib/contextlib.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/contextlib.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/contextlib.py	Sat Jun 20 00:11:15 2009
@@ -103,7 +103,7 @@
 
     """
     warn("With-statements now directly support multiple context managers",
-         DeprecationWarning, 2)
+         DeprecationWarning, 3)
     exits = []
     vars = []
     exc = (None, None, None)

Modified: python/branches/tk_and_idle_maintenance/Lib/distutils/ccompiler.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/distutils/ccompiler.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/distutils/ccompiler.py	Sat Jun 20 00:11:15 2009
@@ -1217,27 +1217,27 @@
 
     return pp_opts
 
-# gen_preprocess_options ()
 
-
-def gen_lib_options (compiler, library_dirs, runtime_library_dirs, libraries):
+def gen_lib_options(compiler, library_dirs, runtime_library_dirs, libraries):
     """Generate linker options for searching library directories and
-    linking with specific libraries.  'libraries' and 'library_dirs' are,
-    respectively, lists of library names (not filenames!) and search
-    directories.  Returns a list of command-line options suitable for use
-    with some compiler (depending on the two format strings passed in).
+    linking with specific libraries.
+
+    'libraries' and 'library_dirs' are, respectively, lists of library names
+    (not filenames!) and search directories.  Returns a list of command-line
+    options suitable for use with some compiler (depending on the two format
+    strings passed in).
     """
     lib_opts = []
 
     for dir in library_dirs:
-        lib_opts.append (compiler.library_dir_option (dir))
+        lib_opts.append(compiler.library_dir_option(dir))
 
     for dir in runtime_library_dirs:
-        opt = compiler.runtime_library_dir_option (dir)
-        if type(opt) is ListType:
-            lib_opts = lib_opts + opt
+        opt = compiler.runtime_library_dir_option(dir)
+        if isinstance(opt, list):
+            lib_opts.extend(opt)
         else:
-            lib_opts.append (opt)
+            lib_opts.append(opt)
 
     # XXX it's important that we *not* remove redundant library mentions!
     # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to
@@ -1246,17 +1246,15 @@
     # pretty nasty way to arrange your C code.
 
     for lib in libraries:
-        (lib_dir, lib_name) = os.path.split (lib)
-        if lib_dir:
-            lib_file = compiler.find_library_file ([lib_dir], lib_name)
-            if lib_file:
-                lib_opts.append (lib_file)
+        lib_dir, lib_name = os.path.split(lib)
+        if lib_dir != '':
+            lib_file = compiler.find_library_file([lib_dir], lib_name)
+            if lib_file is not None:
+                lib_opts.append(lib_file)
             else:
-                compiler.warn ("no library file corresponding to "
-                               "'%s' found (skipping)" % lib)
+                compiler.warn("no library file corresponding to "
+                              "'%s' found (skipping)" % lib)
         else:
-            lib_opts.append (compiler.library_option (lib))
+            lib_opts.append(compiler.library_option(lib))
 
     return lib_opts
-
-# gen_lib_options ()

Modified: python/branches/tk_and_idle_maintenance/Lib/distutils/command/bdist_msi.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/distutils/command/bdist_msi.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/distutils/command/bdist_msi.py	Sat Jun 20 00:11:15 2009
@@ -342,9 +342,14 @@
             exe_action = "PythonExe" + ver
             target_dir_prop = "TARGETDIR" + ver
             exe_prop = "PYTHON" + ver
+            if msilib.Win64:
+                # type: msidbLocatorTypeRawValue + msidbLocatorType64bit
+                Type = 2+16
+            else:
+                Type = 2
             add_data(self.db, "RegLocator",
-                    [(machine_reg, 2, install_path, None, 2),
-                     (user_reg, 1, install_path, None, 2)])
+                    [(machine_reg, 2, install_path, None, Type),
+                     (user_reg, 1, install_path, None, Type)])
             add_data(self.db, "AppSearch",
                     [(machine_prop, machine_reg),
                      (user_prop, user_reg)])

Modified: python/branches/tk_and_idle_maintenance/Lib/distutils/command/upload.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/distutils/command/upload.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/distutils/command/upload.py	Sat Jun 20 00:11:15 2009
@@ -1,26 +1,21 @@
 """distutils.command.upload
 
 Implements the Distutils 'upload' subcommand (upload package to PyPI)."""
-
-from distutils.errors import *
-from distutils.core import PyPIRCCommand
-from distutils.spawn import spawn
-from distutils import log
 import sys
 import os
 import socket
 import platform
-import httplib
+from urllib2 import urlopen, Request, HTTPError
 import base64
 import urlparse
 import cStringIO as StringIO
 from ConfigParser import ConfigParser
+from hashlib import md5
 
-# this keeps compatibility for 2.3 and 2.4
-if sys.version < "2.5":
-    from md5 import md5
-else:
-    from hashlib import md5
+from distutils.errors import *
+from distutils.core import PyPIRCCommand
+from distutils.spawn import spawn
+from distutils import log
 
 class upload(PyPIRCCommand):
 
@@ -67,6 +62,15 @@
             self.upload_file(command, pyversion, filename)
 
     def upload_file(self, command, pyversion, filename):
+        # Makes sure the repository URL is compliant
+        schema, netloc, url, params, query, fragments = \
+            urlparse.urlparse(self.repository)
+        if params or query or fragments:
+            raise AssertionError("Incompatible url %s" % self.repository)
+
+        if schema not in ('http', 'https'):
+            raise AssertionError("unsupported schema " + schema)
+
         # Sign if requested
         if self.sign:
             gpg_args = ["gpg", "--detach-sign", "-a", filename]
@@ -125,7 +129,8 @@
                                      open(filename+".asc").read())
 
         # set up the authentication
-        auth = "Basic " + base64.encodestring(self.username + ":" + self.password).strip()
+        auth = "Basic " + base64.encodestring(self.username + ":" +
+                                              self.password).strip()
 
         # Build up the MIME payload for the POST data
         boundary = '--------------GHSKFJDLGDS7543FJKLFHRE75642756743254'
@@ -134,10 +139,10 @@
         body = StringIO.StringIO()
         for key, value in data.items():
             # handle multiple entries for the same name
-            if type(value) != type([]):
+            if not isinstance(value, list):
                 value = [value]
             for value in value:
-                if type(value) is tuple:
+                if isinstance(value, tuple):
                     fn = ';filename="%s"' % value[0]
                     value = value[1]
                 else:
@@ -157,39 +162,30 @@
         self.announce("Submitting %s to %s" % (filename, self.repository), log.INFO)
 
         # build the Request
-        # We can't use urllib2 since we need to send the Basic
-        # auth right with the first request
-        schema, netloc, url, params, query, fragments = \
-            urlparse.urlparse(self.repository)
-        assert not params and not query and not fragments
-        if schema == 'http':
-            http = httplib.HTTPConnection(netloc)
-        elif schema == 'https':
-            http = httplib.HTTPSConnection(netloc)
-        else:
-            raise AssertionError, "unsupported schema "+schema
-
-        data = ''
-        loglevel = log.INFO
+        headers = {'Content-type':
+                        'multipart/form-data; boundary=%s' % boundary,
+                   'Content-length': str(len(body)),
+                   'Authorization': auth}
+
+        request = Request(self.repository, data=body,
+                          headers=headers)
+        # send the data
         try:
-            http.connect()
-            http.putrequest("POST", url)
-            http.putheader('Content-type',
-                           'multipart/form-data; boundary=%s'%boundary)
-            http.putheader('Content-length', str(len(body)))
-            http.putheader('Authorization', auth)
-            http.endheaders()
-            http.send(body)
+            result = urlopen(request)
+            status = result.getcode()
+            reason = result.msg
         except socket.error, e:
             self.announce(str(e), log.ERROR)
             return
+        except HTTPError, e:
+            status = e.code
+            reason = e.msg
 
-        r = http.getresponse()
-        if r.status == 200:
-            self.announce('Server response (%s): %s' % (r.status, r.reason),
+        if status == 200:
+            self.announce('Server response (%s): %s' % (status, reason),
                           log.INFO)
         else:
-            self.announce('Upload failed (%s): %s' % (r.status, r.reason),
+            self.announce('Upload failed (%s): %s' % (status, reason),
                           log.ERROR)
         if self.show_response:
-            self.announce('-'*75, r.read(), '-'*75)
+            self.announce('-'*75, result.read(), '-'*75)

Modified: python/branches/tk_and_idle_maintenance/Lib/distutils/cygwinccompiler.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/distutils/cygwinccompiler.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/distutils/cygwinccompiler.py	Sat Jun 20 00:11:15 2009
@@ -47,12 +47,19 @@
 
 __revision__ = "$Id$"
 
-import os,sys,copy
+import os
+import sys
+import copy
+from subprocess import Popen, PIPE
+import re
+
 from distutils.ccompiler import gen_preprocess_options, gen_lib_options
 from distutils.unixccompiler import UnixCCompiler
 from distutils.file_util import write_file
 from distutils.errors import DistutilsExecError, CompileError, UnknownFileError
 from distutils import log
+from distutils.version import LooseVersion
+from distutils.spawn import find_executable
 
 def get_msvcr():
     """Include the appropriate MSVC runtime library if Python was built
@@ -74,11 +81,12 @@
             # VS2008 / MSVC 9.0
             return ['msvcr90']
         else:
-            raise ValueError("Unknown MS Compiler version %i " % msc_Ver)
-
+            raise ValueError("Unknown MS Compiler version %s " % msc_ver)
 
-class CygwinCCompiler (UnixCCompiler):
 
+class CygwinCCompiler(UnixCCompiler):
+    """ Handles the Cygwin port of the GNU C compiler to Windows.
+    """
     compiler_type = 'cygwin'
     obj_extension = ".o"
     static_lib_extension = ".a"
@@ -87,11 +95,11 @@
     shared_lib_format = "%s%s"
     exe_extension = ".exe"
 
-    def __init__ (self, verbose=0, dry_run=0, force=0):
+    def __init__(self, verbose=0, dry_run=0, force=0):
 
-        UnixCCompiler.__init__ (self, verbose, dry_run, force)
+        UnixCCompiler.__init__(self, verbose, dry_run, force)
 
-        (status, details) = check_config_h()
+        status, details = check_config_h()
         self.debug_print("Python's GCC status: %s (details: %s)" %
                          (status, details))
         if status is not CONFIG_H_OK:
@@ -146,10 +154,8 @@
             # with MSVC 7.0 or later.
             self.dll_libraries = get_msvcr()
 
-    # __init__ ()
-
-
     def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
+        """Compiles the source by spawing GCC and windres if needed."""
         if ext == '.rc' or ext == '.res':
             # gcc needs '.res' and '.rc' compiled to object files !!!
             try:
@@ -163,21 +169,11 @@
             except DistutilsExecError, msg:
                 raise CompileError, msg
 
-    def link (self,
-              target_desc,
-              objects,
-              output_filename,
-              output_dir=None,
-              libraries=None,
-              library_dirs=None,
-              runtime_library_dirs=None,
-              export_symbols=None,
-              debug=0,
-              extra_preargs=None,
-              extra_postargs=None,
-              build_temp=None,
-              target_lang=None):
-
+    def link(self, target_desc, objects, output_filename, output_dir=None,
+             libraries=None, library_dirs=None, runtime_library_dirs=None,
+             export_symbols=None, debug=0, extra_preargs=None,
+             extra_postargs=None, build_temp=None, target_lang=None):
+        """Link the objects."""
         # use separate copies, so we can modify the lists
         extra_preargs = copy.copy(extra_preargs or [])
         libraries = copy.copy(libraries or [])
@@ -242,64 +238,44 @@
         if not debug:
             extra_preargs.append("-s")
 
-        UnixCCompiler.link(self,
-                           target_desc,
-                           objects,
-                           output_filename,
-                           output_dir,
-                           libraries,
-                           library_dirs,
+        UnixCCompiler.link(self, target_desc, objects, output_filename,
+                           output_dir, libraries, library_dirs,
                            runtime_library_dirs,
                            None, # export_symbols, we do this in our def-file
-                           debug,
-                           extra_preargs,
-                           extra_postargs,
-                           build_temp,
+                           debug, extra_preargs, extra_postargs, build_temp,
                            target_lang)
 
-    # link ()
-
     # -- Miscellaneous methods -----------------------------------------
 
-    # overwrite the one from CCompiler to support rc and res-files
-    def object_filenames (self,
-                          source_filenames,
-                          strip_dir=0,
-                          output_dir=''):
-        if output_dir is None: output_dir = ''
+    def object_filenames(self, source_filenames, strip_dir=0, output_dir=''):
+        """Adds supports for rc and res files."""
+        if output_dir is None:
+            output_dir = ''
         obj_names = []
         for src_name in source_filenames:
             # use normcase to make sure '.rc' is really '.rc' and not '.RC'
-            (base, ext) = os.path.splitext (os.path.normcase(src_name))
+            base, ext = os.path.splitext(os.path.normcase(src_name))
             if ext not in (self.src_extensions + ['.rc','.res']):
                 raise UnknownFileError, \
-                      "unknown file type '%s' (from '%s')" % \
-                      (ext, src_name)
+                      "unknown file type '%s' (from '%s')" % (ext, src_name)
             if strip_dir:
                 base = os.path.basename (base)
-            if ext == '.res' or ext == '.rc':
+            if ext in ('.res', '.rc'):
                 # these need to be compiled to object files
-                obj_names.append (os.path.join (output_dir,
-                                            base + ext + self.obj_extension))
+                obj_names.append (os.path.join(output_dir,
+                                              base + ext + self.obj_extension))
             else:
-                obj_names.append (os.path.join (output_dir,
-                                            base + self.obj_extension))
+                obj_names.append (os.path.join(output_dir,
+                                               base + self.obj_extension))
         return obj_names
 
-    # object_filenames ()
-
-# class CygwinCCompiler
-
-
 # the same as cygwin plus some additional parameters
-class Mingw32CCompiler (CygwinCCompiler):
-
+class Mingw32CCompiler(CygwinCCompiler):
+    """ Handles the Mingw32 port of the GNU C compiler to Windows.
+    """
     compiler_type = 'mingw32'
 
-    def __init__ (self,
-                  verbose=0,
-                  dry_run=0,
-                  force=0):
+    def __init__(self, verbose=0, dry_run=0, force=0):
 
         CygwinCCompiler.__init__ (self, verbose, dry_run, force)
 
@@ -335,10 +311,6 @@
         # with MSVC 7.0 or later.
         self.dll_libraries = get_msvcr()
 
-    # __init__ ()
-
-# class Mingw32CCompiler
-
 # Because these compilers aren't configured in Python's pyconfig.h file by
 # default, we should at least warn the user if he is using a unmodified
 # version.
@@ -348,16 +320,16 @@
 CONFIG_H_UNCERTAIN = "uncertain"
 
 def check_config_h():
+    """Check if the current Python installation appears amenable to building
+    extensions with GCC.
+
+    Returns a tuple (status, details), where 'status' is one of the following
+    constants:
+
+    - CONFIG_H_OK: all is well, go ahead and compile
+    - CONFIG_H_NOTOK: doesn't look good
+    - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h
 
-    """Check if the current Python installation (specifically, pyconfig.h)
-    appears amenable to building extensions with GCC.  Returns a tuple
-    (status, details), where 'status' is one of the following constants:
-      CONFIG_H_OK
-        all is well, go ahead and compile
-      CONFIG_H_NOTOK
-        doesn't look good
-      CONFIG_H_UNCERTAIN
-        not sure -- unable to read pyconfig.h
     'details' is a human-readable string explaining the situation.
 
     Note there are two ways to conclude "OK": either 'sys.version' contains
@@ -369,77 +341,49 @@
     # "pyconfig.h" check -- should probably be renamed...
 
     from distutils import sysconfig
-    import string
-    # if sys.version contains GCC then python was compiled with
-    # GCC, and the pyconfig.h file should be OK
-    if string.find(sys.version,"GCC") >= 0:
-        return (CONFIG_H_OK, "sys.version mentions 'GCC'")
 
+    # if sys.version contains GCC then python was compiled with GCC, and the
+    # pyconfig.h file should be OK
+    if "GCC" in sys.version:
+        return CONFIG_H_OK, "sys.version mentions 'GCC'"
+
+    # let's see if __GNUC__ is mentioned in python.h
     fn = sysconfig.get_config_h_filename()
     try:
-        # It would probably better to read single lines to search.
-        # But we do this only once, and it is fast enough
-        f = open(fn)
-        s = f.read()
-        f.close()
-
+        with open(fn) as config_h:
+            if "__GNUC__" in config_h.read():
+                return CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn
+            else:
+                return CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn
     except IOError, exc:
-        # if we can't read this file, we cannot say it is wrong
-        # the compiler will complain later about this file as missing
         return (CONFIG_H_UNCERTAIN,
                 "couldn't read '%s': %s" % (fn, exc.strerror))
 
-    else:
-        # "pyconfig.h" contains an "#ifdef __GNUC__" or something similar
-        if string.find(s,"__GNUC__") >= 0:
-            return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn)
-        else:
-            return (CONFIG_H_NOTOK, "'%s' does not mention '__GNUC__'" % fn)
+RE_VERSION = re.compile('(\d+\.\d+(\.\d+)*)')
 
+def _find_exe_version(cmd):
+    """Find the version of an executable by running `cmd` in the shell.
 
+    If the command is not found, or the output does not match
+    `RE_VERSION`, returns None.
+    """
+    executable = cmd.split()[0]
+    if find_executable(executable) is None:
+        return None
+    out = Popen(cmd, shell=True, stdout=PIPE).stdout
+    try:
+        out_string = out.read()
+    finally:
+        out.close()
+    result = RE_VERSION.search(out_string)
+    if result is None:
+        return None
+    return LooseVersion(result.group(1))
 
 def get_versions():
     """ Try to find out the versions of gcc, ld and dllwrap.
-        If not possible it returns None for it.
+
+    If not possible it returns None for it.
     """
-    from distutils.version import LooseVersion
-    from distutils.spawn import find_executable
-    import re
-
-    gcc_exe = find_executable('gcc')
-    if gcc_exe:
-        out = os.popen(gcc_exe + ' -dumpversion','r')
-        out_string = out.read()
-        out.close()
-        result = re.search('(\d+\.\d+(\.\d+)*)',out_string)
-        if result:
-            gcc_version = LooseVersion(result.group(1))
-        else:
-            gcc_version = None
-    else:
-        gcc_version = None
-    ld_exe = find_executable('ld')
-    if ld_exe:
-        out = os.popen(ld_exe + ' -v','r')
-        out_string = out.read()
-        out.close()
-        result = re.search('(\d+\.\d+(\.\d+)*)',out_string)
-        if result:
-            ld_version = LooseVersion(result.group(1))
-        else:
-            ld_version = None
-    else:
-        ld_version = None
-    dllwrap_exe = find_executable('dllwrap')
-    if dllwrap_exe:
-        out = os.popen(dllwrap_exe + ' --version','r')
-        out_string = out.read()
-        out.close()
-        result = re.search(' (\d+\.\d+(\.\d+)*)',out_string)
-        if result:
-            dllwrap_version = LooseVersion(result.group(1))
-        else:
-            dllwrap_version = None
-    else:
-        dllwrap_version = None
-    return (gcc_version, ld_version, dllwrap_version)
+    commands = ['gcc -dumpversion', 'ld -v', 'dllwrap --version']
+    return tuple([_find_exe_version(cmd) for cmd in commands])

Modified: python/branches/tk_and_idle_maintenance/Lib/distutils/sysconfig.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/distutils/sysconfig.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/distutils/sysconfig.py	Sat Jun 20 00:11:15 2009
@@ -13,7 +13,6 @@
 
 import os
 import re
-import string
 import sys
 
 from distutils.errors import DistutilsPlatformError
@@ -285,18 +284,25 @@
 
     while 1:
         line = fp.readline()
-        if line is None:                # eof
+        if line is None:  # eof
             break
         m = _variable_rx.match(line)
         if m:
             n, v = m.group(1, 2)
-            v = string.strip(v)
-            if "$" in v:
+            v = v.strip()
+            # `$$' is a literal `$' in make
+            tmpv = v.replace('$$', '')
+
+            if "$" in tmpv:
                 notdone[n] = v
             else:
-                try: v = int(v)
-                except ValueError: pass
-                done[n] = v
+                try:
+                    v = int(v)
+                except ValueError:
+                    # insert literal `$'
+                    done[n] = v.replace('$$', '$')
+                else:
+                    done[n] = v
 
     # do variable interpolation here
     while notdone:
@@ -324,7 +330,7 @@
                     else:
                         try: value = int(value)
                         except ValueError:
-                            done[name] = string.strip(value)
+                            done[name] = value.strip()
                         else:
                             done[name] = value
                         del notdone[name]
@@ -428,7 +434,7 @@
             # relative to the srcdir, which after installation no longer makes
             # sense.
             python_lib = get_python_lib(standard_lib=1)
-            linkerscript_path = string.split(g['LDSHARED'])[0]
+            linkerscript_path = g['LDSHARED'].split()[0]
             linkerscript_name = os.path.basename(linkerscript_path)
             linkerscript = os.path.join(python_lib, 'config',
                                         linkerscript_name)

Modified: python/branches/tk_and_idle_maintenance/Lib/distutils/tests/test_sysconfig.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/distutils/tests/test_sysconfig.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/distutils/tests/test_sysconfig.py	Sat Jun 20 00:11:15 2009
@@ -1,5 +1,6 @@
 """Tests for distutils.sysconfig."""
 import os
+import test
 import unittest
 
 from distutils import sysconfig
@@ -9,6 +10,14 @@
 
 class SysconfigTestCase(support.EnvironGuard,
                         unittest.TestCase):
+    def setUp(self):
+        super(SysconfigTestCase, self).setUp()
+        self.makefile = None
+
+    def tearDown(self):
+        if self.makefile is not None:
+            os.unlink(self.makefile)
+        super(SysconfigTestCase, self).tearDown()
 
     def test_get_config_h_filename(self):
         config_h = sysconfig.get_config_h_filename()
@@ -56,8 +65,32 @@
         sysconfig.customize_compiler(comp)
         self.assertEquals(comp.exes['archiver'], 'my_ar -arflags')
 
+    def test_parse_makefile_base(self):
+        self.makefile = test.test_support.TESTFN
+        fd = open(self.makefile, 'w')
+        fd.write(r"CONFIG_ARGS=  '--arg1=optarg1' 'ENV=LIB'" '\n')
+        fd.write('VAR=$OTHER\nOTHER=foo')
+        fd.close()
+        d = sysconfig.parse_makefile(self.makefile)
+        self.assertEquals(d, {'CONFIG_ARGS': "'--arg1=optarg1' 'ENV=LIB'",
+                              'OTHER': 'foo'})
+
+    def test_parse_makefile_literal_dollar(self):
+        self.makefile = test.test_support.TESTFN
+        fd = open(self.makefile, 'w')
+        fd.write(r"CONFIG_ARGS=  '--arg1=optarg1' 'ENV=\$$LIB'" '\n')
+        fd.write('VAR=$OTHER\nOTHER=foo')
+        fd.close()
+        d = sysconfig.parse_makefile(self.makefile)
+        self.assertEquals(d, {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'",
+                              'OTHER': 'foo'})
+
 
 def test_suite():
     suite = unittest.TestSuite()
     suite.addTest(unittest.makeSuite(SysconfigTestCase))
     return suite
+
+
+if __name__ == '__main__':
+    test.test_support.run_unittest(test_suite())

Modified: python/branches/tk_and_idle_maintenance/Lib/distutils/tests/test_upload.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/distutils/tests/test_upload.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/distutils/tests/test_upload.py	Sat Jun 20 00:11:15 2009
@@ -2,8 +2,8 @@
 import sys
 import os
 import unittest
-import httplib
 
+from distutils.command import upload as upload_mod
 from distutils.command.upload import upload
 from distutils.core import Distribution
 
@@ -19,48 +19,37 @@
 [server1]
 username:me
 """
-class Response(object):
-    def __init__(self, status=200, reason='OK'):
-        self.status = status
-        self.reason = reason
 
-class FakeConnection(object):
+class FakeOpen(object):
 
-    def __init__(self):
-        self.requests = []
-        self.headers = []
-        self.body = ''
+    def __init__(self, url):
+        self.url = url
+        if not isinstance(url, str):
+            self.req = url
+        else:
+            self.req = None
+        self.msg = 'OK'
 
-    def __call__(self, netloc):
-        return self
+    def getcode(self):
+        return 200
 
-    def connect(self):
-        pass
-    endheaders = connect
-
-    def putrequest(self, method, url):
-        self.requests.append((method, url))
-
-    def putheader(self, name, value):
-        self.headers.append((name, value))
-
-    def send(self, body):
-        self.body = body
-
-    def getresponse(self):
-        return Response()
 
 class uploadTestCase(PyPIRCCommandTestCase):
 
     def setUp(self):
         super(uploadTestCase, self).setUp()
-        self.old_class = httplib.HTTPConnection
-        self.conn = httplib.HTTPConnection = FakeConnection()
+        self.old_open = upload_mod.urlopen
+        upload_mod.urlopen = self._urlopen
+        self.last_open = None
 
     def tearDown(self):
-        httplib.HTTPConnection = self.old_class
+        upload_mod.urlopen = self.old_open
         super(uploadTestCase, self).tearDown()
 
+    def _urlopen(self, url):
+        self.last_open = FakeOpen(url)
+        return self.last_open
+
     def test_finalize_options(self):
 
         # new format
@@ -105,12 +94,13 @@
         cmd.run()
 
         # what did we send ?
-        headers = dict(self.conn.headers)
+        headers = dict(self.last_open.req.headers)
         self.assertEquals(headers['Content-length'], '2086')
         self.assert_(headers['Content-type'].startswith('multipart/form-data'))
-
-        self.assertEquals(self.conn.requests, [('POST', '/pypi')])
-        self.assert_('xxx' in self.conn.body)
+        self.assertEquals(self.last_open.req.get_method(), 'POST')
+        self.assertEquals(self.last_open.req.get_full_url(),
+                          'http://pypi.python.org/pypi')
+        self.assert_('xxx' in self.last_open.req.data)
 
 def test_suite():
     return unittest.makeSuite(uploadTestCase)

Modified: python/branches/tk_and_idle_maintenance/Lib/filecmp.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/filecmp.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/filecmp.py	Sat Jun 20 00:11:15 2009
@@ -11,7 +11,6 @@
 
 import os
 import stat
-import contextlib
 from itertools import ifilter, ifilterfalse, imap, izip
 
 __all__ = ["cmp","dircmp","cmpfiles"]
@@ -63,7 +62,7 @@
 
 def _do_cmp(f1, f2):
     bufsize = BUFSIZE
-    with contextlib.nested(open(f1, 'rb'), open(f2, 'rb')) as (fp1, fp2):
+    with open(f1, 'rb') as fp1, open(f2, 'rb') as fp2:
         while True:
             b1 = fp1.read(bufsize)
             b2 = fp2.read(bufsize)

Modified: python/branches/tk_and_idle_maintenance/Lib/idlelib/EditorWindow.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/idlelib/EditorWindow.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/idlelib/EditorWindow.py	Sat Jun 20 00:11:15 2009
@@ -27,8 +27,10 @@
     major, minor, micro, level, serial = sys.version_info
     release = '%s%s' % (major, minor)
     if micro:
-        release += '%s' % micro
-    if level != 'final':
+        release += '%s' % (micro,)
+    if level == 'candidate':
+        release += 'rc%s' % (serial,)
+    elif level != 'final':
         release += '%s%s' % (level[0], serial)
     return release
 

Modified: python/branches/tk_and_idle_maintenance/Lib/io.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/io.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/io.py	Sat Jun 20 00:11:15 2009
@@ -1,5 +1,4 @@
-"""
-The io module provides the Python interfaces to stream handling. The
+"""The io module provides the Python interfaces to stream handling. The
 builtin open function is defined in this module.
 
 At the top of the I/O hierarchy is the abstract base class IOBase. It
@@ -35,9 +34,6 @@
 """
 # New I/O library conforming to PEP 3116.
 
-# This is a prototype; hopefully eventually some of this will be
-# reimplemented in C.
-
 # XXX edge cases when switching between reading/writing
 # XXX need to support 1 meaning line-buffered
 # XXX whenever an argument is None, use the default value
@@ -45,1825 +41,58 @@
 # XXX buffered readinto should work with arbitrary buffer objects
 # XXX use incremental encoder for text output, at least for UTF-16 and UTF-8-SIG
 # XXX check writable, readable and seekable in appropriate places
-from __future__ import print_function
-from __future__ import unicode_literals
+
 
 __author__ = ("Guido van Rossum <guido at python.org>, "
               "Mike Verdone <mike.verdone at gmail.com>, "
-              "Mark Russell <mark.russell at zen.co.uk>")
+              "Mark Russell <mark.russell at zen.co.uk>, "
+              "Antoine Pitrou <solipsis at pitrou.net>, "
+              "Amaury Forgeot d'Arc <amauryfa at gmail.com>, "
+              "Benjamin Peterson <benjamin at python.org>")
 
 __all__ = ["BlockingIOError", "open", "IOBase", "RawIOBase", "FileIO",
            "BytesIO", "StringIO", "BufferedIOBase",
            "BufferedReader", "BufferedWriter", "BufferedRWPair",
            "BufferedRandom", "TextIOBase", "TextIOWrapper",
-           "SEEK_SET", "SEEK_CUR", "SEEK_END"]
+           "UnsupportedOperation", "SEEK_SET", "SEEK_CUR", "SEEK_END"]
 
-import os
+
+import _io
 import abc
-import codecs
-import _fileio
-import threading
 
-# open() uses st_blksize whenever we can
-DEFAULT_BUFFER_SIZE = 8 * 1024  # bytes
+from _io import (DEFAULT_BUFFER_SIZE, BlockingIOError, UnsupportedOperation,
+                 open, FileIO, BytesIO, StringIO, BufferedReader,
+                 BufferedWriter, BufferedRWPair, BufferedRandom,
+                 IncrementalNewlineDecoder, TextIOWrapper)
+
+OpenWrapper = _io.open # for compatibility with _pyio
 
 # for seek()
 SEEK_SET = 0
 SEEK_CUR = 1
 SEEK_END = 2
 
-# py3k has only new style classes
-__metaclass__ = type
-
-class BlockingIOError(IOError):
-
-    """Exception raised when I/O would block on a non-blocking I/O stream."""
-
-    def __init__(self, errno, strerror, characters_written=0):
-        IOError.__init__(self, errno, strerror)
-        self.characters_written = characters_written
-
-
-def open(file, mode="r", buffering=None, encoding=None, errors=None,
-         newline=None, closefd=True):
-    r"""Open file and return a stream. If the file cannot be opened, an IOError is
-    raised.
-
-    file is either a string giving the name (and the path if the file
-    isn't in the current working directory) of the file to be opened or an
-    integer file descriptor of the file to be wrapped. (If a file
-    descriptor is given, it is closed when the returned I/O object is
-    closed, unless closefd is set to False.)
-
-    mode is an optional string that specifies the mode in which the file
-    is opened. It defaults to 'r' which means open for reading in text
-    mode.  Other common values are 'w' for writing (truncating the file if
-    it already exists), and 'a' for appending (which on some Unix systems,
-    means that all writes append to the end of the file regardless of the
-    current seek position). In text mode, if encoding is not specified the
-    encoding used is platform dependent. (For reading and writing raw
-    bytes use binary mode and leave encoding unspecified.) The available
-    modes are:
-
-    ========= ===============================================================
-    Character Meaning
-    --------- ---------------------------------------------------------------
-    'r'       open for reading (default)
-    'w'       open for writing, truncating the file first
-    'a'       open for writing, appending to the end of the file if it exists
-    'b'       binary mode
-    't'       text mode (default)
-    '+'       open a disk file for updating (reading and writing)
-    'U'       universal newline mode (for backwards compatibility; unneeded
-              for new code)
-    ========= ===============================================================
-
-    The default mode is 'rt' (open for reading text). For binary random
-    access, the mode 'w+b' opens and truncates the file to 0 bytes, while
-    'r+b' opens the file without truncation.
-
-    Python distinguishes between files opened in binary and text modes,
-    even when the underlying operating system doesn't. Files opened in
-    binary mode (appending 'b' to the mode argument) return contents as
-    bytes objects without any decoding. In text mode (the default, or when
-    't' is appended to the mode argument), the contents of the file are
-    returned as strings, the bytes having been first decoded using a
-    platform-dependent encoding or using the specified encoding if given.
-
-    buffering is an optional integer used to set the buffering policy. By
-    default full buffering is on. Pass 0 to switch buffering off (only
-    allowed in binary mode), 1 to set line buffering, and an integer > 1
-    for full buffering.
-
-    encoding is the name of the encoding used to decode or encode the
-    file. This should only be used in text mode. The default encoding is
-    platform dependent, but any encoding supported by Python can be
-    passed.  See the codecs module for the list of supported encodings.
-
-    errors is an optional string that specifies how encoding errors are to
-    be handled---this argument should not be used in binary mode. Pass
-    'strict' to raise a ValueError exception if there is an encoding error
-    (the default of None has the same effect), or pass 'ignore' to ignore
-    errors. (Note that ignoring encoding errors can lead to data loss.)
-    See the documentation for codecs.register for a list of the permitted
-    encoding error strings.
-
-    newline controls how universal newlines works (it only applies to text
-    mode). It can be None, '', '\n', '\r', and '\r\n'.  It works as
-    follows:
-
-    * On input, if newline is None, universal newlines mode is
-      enabled. Lines in the input can end in '\n', '\r', or '\r\n', and
-      these are translated into '\n' before being returned to the
-      caller. If it is '', universal newline mode is enabled, but line
-      endings are returned to the caller untranslated. If it has any of
-      the other legal values, input lines are only terminated by the given
-      string, and the line ending is returned to the caller untranslated.
-
-    * On output, if newline is None, any '\n' characters written are
-      translated to the system default line separator, os.linesep. If
-      newline is '', no translation takes place. If newline is any of the
-      other legal values, any '\n' characters written are translated to
-      the given string.
-
-    If closefd is False, the underlying file descriptor will be kept open
-    when the file is closed. This does not work when a file name is given
-    and must be True in that case.
-
-    open() returns a file object whose type depends on the mode, and
-    through which the standard file operations such as reading and writing
-    are performed. When open() is used to open a file in a text mode ('w',
-    'r', 'wt', 'rt', etc.), it returns a TextIOWrapper. When used to open
-    a file in a binary mode, the returned class varies: in read binary
-    mode, it returns a BufferedReader; in write binary and append binary
-    modes, it returns a BufferedWriter, and in read/write mode, it returns
-    a BufferedRandom.
-
-    It is also possible to use a string or bytearray as a file for both
-    reading and writing. For strings StringIO can be used like a file
-    opened in a text mode, and for bytes a BytesIO can be used like a file
-    opened in a binary mode.
-    """
-    if not isinstance(file, (basestring, int)):
-        raise TypeError("invalid file: %r" % file)
-    if not isinstance(mode, basestring):
-        raise TypeError("invalid mode: %r" % mode)
-    if buffering is not None and not isinstance(buffering, int):
-        raise TypeError("invalid buffering: %r" % buffering)
-    if encoding is not None and not isinstance(encoding, basestring):
-        raise TypeError("invalid encoding: %r" % encoding)
-    if errors is not None and not isinstance(errors, basestring):
-        raise TypeError("invalid errors: %r" % errors)
-    modes = set(mode)
-    if modes - set("arwb+tU") or len(mode) > len(modes):
-        raise ValueError("invalid mode: %r" % mode)
-    reading = "r" in modes
-    writing = "w" in modes
-    appending = "a" in modes
-    updating = "+" in modes
-    text = "t" in modes
-    binary = "b" in modes
-    if "U" in modes:
-        if writing or appending:
-            raise ValueError("can't use U and writing mode at once")
-        reading = True
-    if text and binary:
-        raise ValueError("can't have text and binary mode at once")
-    if reading + writing + appending > 1:
-        raise ValueError("can't have read/write/append mode at once")
-    if not (reading or writing or appending):
-        raise ValueError("must have exactly one of read/write/append mode")
-    if binary and encoding is not None:
-        raise ValueError("binary mode doesn't take an encoding argument")
-    if binary and errors is not None:
-        raise ValueError("binary mode doesn't take an errors argument")
-    if binary and newline is not None:
-        raise ValueError("binary mode doesn't take a newline argument")
-    raw = FileIO(file,
-                 (reading and "r" or "") +
-                 (writing and "w" or "") +
-                 (appending and "a" or "") +
-                 (updating and "+" or ""),
-                 closefd)
-    if buffering is None:
-        buffering = -1
-    line_buffering = False
-    if buffering == 1 or buffering < 0 and raw.isatty():
-        buffering = -1
-        line_buffering = True
-    if buffering < 0:
-        buffering = DEFAULT_BUFFER_SIZE
-        try:
-            bs = os.fstat(raw.fileno()).st_blksize
-        except (os.error, AttributeError):
-            pass
-        else:
-            if bs > 1:
-                buffering = bs
-    if buffering < 0:
-        raise ValueError("invalid buffering size")
-    if buffering == 0:
-        if binary:
-            return raw
-        raise ValueError("can't have unbuffered text I/O")
-    if updating:
-        buffer = BufferedRandom(raw, buffering)
-    elif writing or appending:
-        buffer = BufferedWriter(raw, buffering)
-    elif reading:
-        buffer = BufferedReader(raw, buffering)
-    else:
-        raise ValueError("unknown mode: %r" % mode)
-    if binary:
-        return buffer
-    text = TextIOWrapper(buffer, encoding, errors, newline, line_buffering)
-    text.mode = mode
-    return text
-
-class _DocDescriptor:
-    """Helper for builtins.open.__doc__
-    """
-    def __get__(self, obj, typ):
-        return (
-            "open(file, mode='r', buffering=None, encoding=None, "
-                 "errors=None, newline=None, closefd=True)\n\n" +
-            open.__doc__)
-
-class OpenWrapper:
-    """Wrapper for builtins.open
-
-    Trick so that open won't become a bound method when stored
-    as a class variable (as dumbdbm does).
-
-    See initstdio() in Python/pythonrun.c.
-    """
-    __doc__ = _DocDescriptor()
-
-    def __new__(cls, *args, **kwargs):
-        return open(*args, **kwargs)
-
+# Declaring ABCs in C is tricky so we do it here.
+# Method descriptions and default implementations are inherited from the C
+# version however.
+class IOBase(_io._IOBase):
+    __metaclass__ = abc.ABCMeta
 
-class UnsupportedOperation(ValueError, IOError):
+class RawIOBase(_io._RawIOBase, IOBase):
     pass
 
+class BufferedIOBase(_io._BufferedIOBase, IOBase):
+    pass
 
-class IOBase(object):
-
-    """The abstract base class for all I/O classes, acting on streams of
-    bytes. There is no public constructor.
-
-    This class provides dummy implementations for many methods that
-    derived classes can override selectively; the default implementations
-    represent a file that cannot be read, written or seeked.
-
-    Even though IOBase does not declare read, readinto, or write because
-    their signatures will vary, implementations and clients should
-    consider those methods part of the interface. Also, implementations
-    may raise a IOError when operations they do not support are called.
-
-    The basic type used for binary data read from or written to a file is
-    bytes. bytearrays are accepted too, and in some cases (such as
-    readinto) needed. Text I/O classes work with str data.
-
-    Note that calling any method (even inquiries) on a closed stream is
-    undefined. Implementations may raise IOError in this case.
-
-    IOBase (and its subclasses) support the iterator protocol, meaning
-    that an IOBase object can be iterated over yielding the lines in a
-    stream.
-
-    IOBase also supports the :keyword:`with` statement. In this example,
-    fp is closed after the suite of the with statment is complete:
-
-    with open('spam.txt', 'r') as fp:
-        fp.write('Spam and eggs!')
-    """
-
-    __metaclass__ = abc.ABCMeta
+class TextIOBase(_io._TextIOBase, IOBase):
+    pass
 
-    ### Internal ###
+RawIOBase.register(FileIO)
 
-    def _unsupported(self, name):
-        """Internal: raise an exception for unsupported operations."""
-        raise UnsupportedOperation("%s.%s() not supported" %
-                                   (self.__class__.__name__, name))
-
-    ### Positioning ###
-
-    def seek(self, pos, whence = 0):
-        """Change stream position.
-
-        Change the stream position to byte offset offset. offset is
-        interpreted relative to the position indicated by whence.  Values
-        for whence are:
-
-        * 0 -- start of stream (the default); offset should be zero or positive
-        * 1 -- current stream position; offset may be negative
-        * 2 -- end of stream; offset is usually negative
-
-        Return the new absolute position.
-        """
-        self._unsupported("seek")
-
-    def tell(self):
-        """Return current stream position."""
-        return self.seek(0, 1)
-
-    def truncate(self, pos = None):
-        """Truncate file to size bytes.
-
-        Size defaults to the current IO position as reported by tell().  Return
-        the new size.
-        """
-        self._unsupported("truncate")
-
-    ### Flush and close ###
-
-    def flush(self):
-        """Flush write buffers, if applicable.
-
-        This is not implemented for read-only and non-blocking streams.
-        """
-        # XXX Should this return the number of bytes written???
-
-    __closed = False
-
-    def close(self):
-        """Flush and close the IO object.
-
-        This method has no effect if the file is already closed.
-        """
-        if not self.__closed:
-            try:
-                self.flush()
-            except IOError:
-                pass  # If flush() fails, just give up
-            self.__closed = True
-
-    def __del__(self):
-        """Destructor.  Calls close()."""
-        # The try/except block is in case this is called at program
-        # exit time, when it's possible that globals have already been
-        # deleted, and then the close() call might fail.  Since
-        # there's nothing we can do about such failures and they annoy
-        # the end users, we suppress the traceback.
-        try:
-            self.close()
-        except:
-            pass
-
-    ### Inquiries ###
-
-    def seekable(self):
-        """Return whether object supports random access.
-
-        If False, seek(), tell() and truncate() will raise IOError.
-        This method may need to do a test seek().
-        """
-        return False
-
-    def _checkSeekable(self, msg=None):
-        """Internal: raise an IOError if file is not seekable
-        """
-        if not self.seekable():
-            raise IOError("File or stream is not seekable."
-                          if msg is None else msg)
-
-
-    def readable(self):
-        """Return whether object was opened for reading.
-
-        If False, read() will raise IOError.
-        """
-        return False
-
-    def _checkReadable(self, msg=None):
-        """Internal: raise an IOError if file is not readable
-        """
-        if not self.readable():
-            raise IOError("File or stream is not readable."
-                          if msg is None else msg)
-
-    def writable(self):
-        """Return whether object was opened for writing.
-
-        If False, write() and truncate() will raise IOError.
-        """
-        return False
-
-    def _checkWritable(self, msg=None):
-        """Internal: raise an IOError if file is not writable
-        """
-        if not self.writable():
-            raise IOError("File or stream is not writable."
-                          if msg is None else msg)
-
-    @property
-    def closed(self):
-        """closed: bool.  True iff the file has been closed.
-
-        For backwards compatibility, this is a property, not a predicate.
-        """
-        return self.__closed
-
-    def _checkClosed(self, msg=None):
-        """Internal: raise an ValueError if file is closed
-        """
-        if self.closed:
-            raise ValueError("I/O operation on closed file."
-                             if msg is None else msg)
-
-    ### Context manager ###
-
-    def __enter__(self):
-        """Context management protocol.  Returns self."""
-        self._checkClosed()
-        return self
-
-    def __exit__(self, *args):
-        """Context management protocol.  Calls close()"""
-        self.close()
-
-    ### Lower-level APIs ###
-
-    # XXX Should these be present even if unimplemented?
-
-    def fileno(self):
-        """Returns underlying file descriptor if one exists.
-
-        An IOError is raised if the IO object does not use a file descriptor.
-        """
-        self._unsupported("fileno")
-
-    def isatty(self):
-        """Return whether this is an 'interactive' stream.
-
-        Return False if it can't be determined.
-        """
-        self._checkClosed()
-        return False
-
-    ### Readline[s] and writelines ###
-
-    def readline(self, limit = -1):
-        r"""Read and return a line from the stream.
-
-        If limit is specified, at most limit bytes will be read.
-
-        The line terminator is always b'\n' for binary files; for text
-        files, the newlines argument to open can be used to select the line
-        terminator(s) recognized.
-        """
-        self._checkClosed()
-        if hasattr(self, "peek"):
-            def nreadahead():
-                readahead = self.peek(1)
-                if not readahead:
-                    return 1
-                n = (readahead.find(b"\n") + 1) or len(readahead)
-                if limit >= 0:
-                    n = min(n, limit)
-                return n
-        else:
-            def nreadahead():
-                return 1
-        if limit is None:
-            limit = -1
-        if not isinstance(limit, (int, long)):
-            raise TypeError("limit must be an integer")
-        res = bytearray()
-        while limit < 0 or len(res) < limit:
-            b = self.read(nreadahead())
-            if not b:
-                break
-            res += b
-            if res.endswith(b"\n"):
-                break
-        return bytes(res)
-
-    def __iter__(self):
-        self._checkClosed()
-        return self
-
-    def next(self):
-        line = self.readline()
-        if not line:
-            raise StopIteration
-        return line
-
-    def readlines(self, hint=None):
-        """Return a list of lines from the stream.
-
-        hint can be specified to control the number of lines read: no more
-        lines will be read if the total size (in bytes/characters) of all
-        lines so far exceeds hint.
-        """
-        if hint is None:
-            hint = -1
-        if not isinstance(hint, (int, long)):
-            raise TypeError("hint must be an integer")
-        if hint <= 0:
-            return list(self)
-        n = 0
-        lines = []
-        for line in self:
-            lines.append(line)
-            n += len(line)
-            if n >= hint:
-                break
-        return lines
-
-    def writelines(self, lines):
-        self._checkClosed()
-        for line in lines:
-            self.write(line)
-
-
-class RawIOBase(IOBase):
-
-    """Base class for raw binary I/O."""
-
-    # The read() method is implemented by calling readinto(); derived
-    # classes that want to support read() only need to implement
-    # readinto() as a primitive operation.  In general, readinto() can be
-    # more efficient than read().
-
-    # (It would be tempting to also provide an implementation of
-    # readinto() in terms of read(), in case the latter is a more suitable
-    # primitive operation, but that would lead to nasty recursion in case
-    # a subclass doesn't implement either.)
-
-    def read(self, n = -1):
-        """Read and return up to n bytes.
-
-        Returns an empty bytes array on EOF, or None if the object is
-        set not to block and has no data to read.
-        """
-        if n is None:
-            n = -1
-        if n < 0:
-            return self.readall()
-        b = bytearray(n.__index__())
-        n = self.readinto(b)
-        del b[n:]
-        return bytes(b)
-
-    def readall(self):
-        """Read until EOF, using multiple read() call."""
-        res = bytearray()
-        while True:
-            data = self.read(DEFAULT_BUFFER_SIZE)
-            if not data:
-                break
-            res += data
-        return bytes(res)
-
-    def readinto(self, b):
-        """Read up to len(b) bytes into b.
-
-        Returns number of bytes read (0 for EOF), or None if the object
-        is set not to block as has no data to read.
-        """
-        self._unsupported("readinto")
-
-    def write(self, b):
-        """Write the given buffer to the IO stream.
-
-        Returns the number of bytes written, which may be less than len(b).
-        """
-        self._unsupported("write")
-
-
-class FileIO(_fileio._FileIO, RawIOBase):
-
-    """Raw I/O implementation for OS files."""
-
-    # This multiply inherits from _FileIO and RawIOBase to make
-    # isinstance(io.FileIO(), io.RawIOBase) return True without requiring
-    # that _fileio._FileIO inherits from io.RawIOBase (which would be hard
-    # to do since _fileio.c is written in C).
-
-    def __init__(self, name, mode="r", closefd=True):
-        _fileio._FileIO.__init__(self, name, mode, closefd)
-        self._name = name
-
-    def close(self):
-        _fileio._FileIO.close(self)
-        RawIOBase.close(self)
-
-    @property
-    def name(self):
-        return self._name
-
-
-class BufferedIOBase(IOBase):
-
-    """Base class for buffered IO objects.
-
-    The main difference with RawIOBase is that the read() method
-    supports omitting the size argument, and does not have a default
-    implementation that defers to readinto().
-
-    In addition, read(), readinto() and write() may raise
-    BlockingIOError if the underlying raw stream is in non-blocking
-    mode and not ready; unlike their raw counterparts, they will never
-    return None.
-
-    A typical implementation should not inherit from a RawIOBase
-    implementation, but wrap one.
-    """
-
-    def read(self, n = None):
-        """Read and return up to n bytes.
-
-        If the argument is omitted, None, or negative, reads and
-        returns all data until EOF.
-
-        If the argument is positive, and the underlying raw stream is
-        not 'interactive', multiple raw reads may be issued to satisfy
-        the byte count (unless EOF is reached first).  But for
-        interactive raw streams (XXX and for pipes?), at most one raw
-        read will be issued, and a short result does not imply that
-        EOF is imminent.
-
-        Returns an empty bytes array on EOF.
-
-        Raises BlockingIOError if the underlying raw stream has no
-        data at the moment.
-        """
-        self._unsupported("read")
-
-    def readinto(self, b):
-        """Read up to len(b) bytes into b.
-
-        Like read(), this may issue multiple reads to the underlying raw
-        stream, unless the latter is 'interactive'.
-
-        Returns the number of bytes read (0 for EOF).
-
-        Raises BlockingIOError if the underlying raw stream has no
-        data at the moment.
-        """
-        # XXX This ought to work with anything that supports the buffer API
-        data = self.read(len(b))
-        n = len(data)
-        try:
-            b[:n] = data
-        except TypeError as err:
-            import array
-            if not isinstance(b, array.array):
-                raise err
-            b[:n] = array.array(b'b', data)
-        return n
-
-    def write(self, b):
-        """Write the given buffer to the IO stream.
-
-        Return the number of bytes written, which is never less than
-        len(b).
-
-        Raises BlockingIOError if the buffer is full and the
-        underlying raw stream cannot accept more data at the moment.
-        """
-        self._unsupported("write")
-
-
-class _BufferedIOMixin(BufferedIOBase):
-
-    """A mixin implementation of BufferedIOBase with an underlying raw stream.
-
-    This passes most requests on to the underlying raw stream.  It
-    does *not* provide implementations of read(), readinto() or
-    write().
-    """
-
-    def __init__(self, raw):
-        self.raw = raw
-
-    ### Positioning ###
-
-    def seek(self, pos, whence=0):
-        return self.raw.seek(pos, whence)
-
-    def tell(self):
-        return self.raw.tell()
-
-    def truncate(self, pos=None):
-        # Flush the stream.  We're mixing buffered I/O with lower-level I/O,
-        # and a flush may be necessary to synch both views of the current
-        # file state.
-        self.flush()
-
-        if pos is None:
-            pos = self.tell()
-        # XXX: Should seek() be used, instead of passing the position
-        # XXX  directly to truncate?
-        return self.raw.truncate(pos)
-
-    ### Flush and close ###
-
-    def flush(self):
-        self.raw.flush()
-
-    def close(self):
-        if not self.closed:
-            try:
-                self.flush()
-            except IOError:
-                pass  # If flush() fails, just give up
-            self.raw.close()
-
-    ### Inquiries ###
-
-    def seekable(self):
-        return self.raw.seekable()
-
-    def readable(self):
-        return self.raw.readable()
-
-    def writable(self):
-        return self.raw.writable()
-
-    @property
-    def closed(self):
-        return self.raw.closed
-
-    @property
-    def name(self):
-        return self.raw.name
-
-    @property
-    def mode(self):
-        return self.raw.mode
-
-    ### Lower-level APIs ###
-
-    def fileno(self):
-        return self.raw.fileno()
-
-    def isatty(self):
-        return self.raw.isatty()
-
-
-class _BytesIO(BufferedIOBase):
-
-    """Buffered I/O implementation using an in-memory bytes buffer."""
-
-    # XXX More docs
-
-    def __init__(self, initial_bytes=None):
-        buf = bytearray()
-        if initial_bytes is not None:
-            buf += bytearray(initial_bytes)
-        self._buffer = buf
-        self._pos = 0
-
-    def getvalue(self):
-        """Return the bytes value (contents) of the buffer
-        """
-        if self.closed:
-            raise ValueError("getvalue on closed file")
-        return bytes(self._buffer)
-
-    def read(self, n=None):
-        if self.closed:
-            raise ValueError("read from closed file")
-        if n is None:
-            n = -1
-        if not isinstance(n, (int, long)):
-            raise TypeError("argument must be an integer")
-        if n < 0:
-            n = len(self._buffer)
-        if len(self._buffer) <= self._pos:
-            return b""
-        newpos = min(len(self._buffer), self._pos + n)
-        b = self._buffer[self._pos : newpos]
-        self._pos = newpos
-        return bytes(b)
-
-    def read1(self, n):
-        """this is the same as read.
-        """
-        return self.read(n)
-
-    def write(self, b):
-        if self.closed:
-            raise ValueError("write to closed file")
-        if isinstance(b, unicode):
-            raise TypeError("can't write unicode to binary stream")
-        n = len(b)
-        if n == 0:
-            return 0
-        pos = self._pos
-        if pos > len(self._buffer):
-            # Inserts null bytes between the current end of the file
-            # and the new write position.
-            padding = b'\x00' * (pos - len(self._buffer))
-            self._buffer += padding
-        self._buffer[pos:pos + n] = b
-        self._pos += n
-        return n
-
-    def seek(self, pos, whence=0):
-        if self.closed:
-            raise ValueError("seek on closed file")
-        try:
-            pos = pos.__index__()
-        except AttributeError as err:
-            raise TypeError("an integer is required") # from err
-        if whence == 0:
-            if pos < 0:
-                raise ValueError("negative seek position %r" % (pos,))
-            self._pos = pos
-        elif whence == 1:
-            self._pos = max(0, self._pos + pos)
-        elif whence == 2:
-            self._pos = max(0, len(self._buffer) + pos)
-        else:
-            raise ValueError("invalid whence value")
-        return self._pos
-
-    def tell(self):
-        if self.closed:
-            raise ValueError("tell on closed file")
-        return self._pos
-
-    def truncate(self, pos=None):
-        if self.closed:
-            raise ValueError("truncate on closed file")
-        if pos is None:
-            pos = self._pos
-        elif pos < 0:
-            raise ValueError("negative truncate position %r" % (pos,))
-        del self._buffer[pos:]
-        return self.seek(pos)
-
-    def readable(self):
-        return True
-
-    def writable(self):
-        return True
-
-    def seekable(self):
-        return True
-
-# Use the faster implementation of BytesIO if available
-try:
-    import _bytesio
-
-    class BytesIO(_bytesio._BytesIO, BufferedIOBase):
-        __doc__ = _bytesio._BytesIO.__doc__
-
-except ImportError:
-    BytesIO = _BytesIO
-
-
-class BufferedReader(_BufferedIOMixin):
-
-    """BufferedReader(raw[, buffer_size])
-
-    A buffer for a readable, sequential BaseRawIO object.
-
-    The constructor creates a BufferedReader for the given readable raw
-    stream and buffer_size. If buffer_size is omitted, DEFAULT_BUFFER_SIZE
-    is used.
-    """
-
-    def __init__(self, raw, buffer_size=DEFAULT_BUFFER_SIZE):
-        """Create a new buffered reader using the given readable raw IO object.
-        """
-        raw._checkReadable()
-        _BufferedIOMixin.__init__(self, raw)
-        self.buffer_size = buffer_size
-        self._reset_read_buf()
-        self._read_lock = threading.Lock()
-
-    def _reset_read_buf(self):
-        self._read_buf = b""
-        self._read_pos = 0
-
-    def read(self, n=None):
-        """Read n bytes.
-
-        Returns exactly n bytes of data unless the underlying raw IO
-        stream reaches EOF or if the call would block in non-blocking
-        mode. If n is negative, read until EOF or until read() would
-        block.
-        """
-        with self._read_lock:
-            return self._read_unlocked(n)
-
-    def _read_unlocked(self, n=None):
-        nodata_val = b""
-        empty_values = (b"", None)
-        buf = self._read_buf
-        pos = self._read_pos
-
-        # Special case for when the number of bytes to read is unspecified.
-        if n is None or n == -1:
-            self._reset_read_buf()
-            chunks = [buf[pos:]]  # Strip the consumed bytes.
-            current_size = 0
-            while True:
-                # Read until EOF or until read() would block.
-                chunk = self.raw.read()
-                if chunk in empty_values:
-                    nodata_val = chunk
-                    break
-                current_size += len(chunk)
-                chunks.append(chunk)
-            return b"".join(chunks) or nodata_val
-
-        # The number of bytes to read is specified, return at most n bytes.
-        avail = len(buf) - pos  # Length of the available buffered data.
-        if n <= avail:
-            # Fast path: the data to read is fully buffered.
-            self._read_pos += n
-            return buf[pos:pos+n]
-        # Slow path: read from the stream until enough bytes are read,
-        # or until an EOF occurs or until read() would block.
-        chunks = [buf[pos:]]
-        wanted = max(self.buffer_size, n)
-        while avail < n:
-            chunk = self.raw.read(wanted)
-            if chunk in empty_values:
-                nodata_val = chunk
-                break
-            avail += len(chunk)
-            chunks.append(chunk)
-        # n is more then avail only when an EOF occurred or when
-        # read() would have blocked.
-        n = min(n, avail)
-        out = b"".join(chunks)
-        self._read_buf = out[n:]  # Save the extra data in the buffer.
-        self._read_pos = 0
-        return out[:n] if out else nodata_val
-
-    def peek(self, n=0):
-        """Returns buffered bytes without advancing the position.
-
-        The argument indicates a desired minimal number of bytes; we
-        do at most one raw read to satisfy it.  We never return more
-        than self.buffer_size.
-        """
-        with self._read_lock:
-            return self._peek_unlocked(n)
-
-    def _peek_unlocked(self, n=0):
-        want = min(n, self.buffer_size)
-        have = len(self._read_buf) - self._read_pos
-        if have < want:
-            to_read = self.buffer_size - have
-            current = self.raw.read(to_read)
-            if current:
-                self._read_buf = self._read_buf[self._read_pos:] + current
-                self._read_pos = 0
-        return self._read_buf[self._read_pos:]
-
-    def read1(self, n):
-        """Reads up to n bytes, with at most one read() system call."""
-        # Returns up to n bytes.  If at least one byte is buffered, we
-        # only return buffered bytes.  Otherwise, we do one raw read.
-        if n <= 0:
-            return b""
-        with self._read_lock:
-            self._peek_unlocked(1)
-            return self._read_unlocked(
-                min(n, len(self._read_buf) - self._read_pos))
-
-    def tell(self):
-        return self.raw.tell() - len(self._read_buf) + self._read_pos
-
-    def seek(self, pos, whence=0):
-        with self._read_lock:
-            if whence == 1:
-                pos -= len(self._read_buf) - self._read_pos
-            pos = self.raw.seek(pos, whence)
-            self._reset_read_buf()
-            return pos
-
-
-class BufferedWriter(_BufferedIOMixin):
-
-    """A buffer for a writeable sequential RawIO object.
-
-    The constructor creates a BufferedWriter for the given writeable raw
-    stream. If the buffer_size is not given, it defaults to
-    DEAFULT_BUFFER_SIZE. If max_buffer_size is omitted, it defaults to
-    twice the buffer size.
-    """
-
-    def __init__(self, raw,
-                 buffer_size=DEFAULT_BUFFER_SIZE, max_buffer_size=None):
-        raw._checkWritable()
-        _BufferedIOMixin.__init__(self, raw)
-        self.buffer_size = buffer_size
-        self.max_buffer_size = (2*buffer_size
-                                if max_buffer_size is None
-                                else max_buffer_size)
-        self._write_buf = bytearray()
-        self._write_lock = threading.Lock()
-
-    def write(self, b):
-        if self.closed:
-            raise ValueError("write to closed file")
-        if isinstance(b, unicode):
-            raise TypeError("can't write unicode to binary stream")
-        with self._write_lock:
-            # XXX we can implement some more tricks to try and avoid
-            # partial writes
-            if len(self._write_buf) > self.buffer_size:
-                # We're full, so let's pre-flush the buffer
-                try:
-                    self._flush_unlocked()
-                except BlockingIOError as e:
-                    # We can't accept anything else.
-                    # XXX Why not just let the exception pass through?
-                    raise BlockingIOError(e.errno, e.strerror, 0)
-            before = len(self._write_buf)
-            self._write_buf.extend(b)
-            written = len(self._write_buf) - before
-            if len(self._write_buf) > self.buffer_size:
-                try:
-                    self._flush_unlocked()
-                except BlockingIOError as e:
-                    if len(self._write_buf) > self.max_buffer_size:
-                        # We've hit max_buffer_size. We have to accept a
-                        # partial write and cut back our buffer.
-                        overage = len(self._write_buf) - self.max_buffer_size
-                        self._write_buf = self._write_buf[:self.max_buffer_size]
-                        raise BlockingIOError(e.errno, e.strerror, overage)
-            return written
-
-    def truncate(self, pos=None):
-        with self._write_lock:
-            self._flush_unlocked()
-            if pos is None:
-                pos = self.raw.tell()
-            return self.raw.truncate(pos)
-
-    def flush(self):
-        with self._write_lock:
-            self._flush_unlocked()
-
-    def _flush_unlocked(self):
-        if self.closed:
-            raise ValueError("flush of closed file")
-        written = 0
-        try:
-            while self._write_buf:
-                n = self.raw.write(self._write_buf)
-                del self._write_buf[:n]
-                written += n
-        except BlockingIOError as e:
-            n = e.characters_written
-            del self._write_buf[:n]
-            written += n
-            raise BlockingIOError(e.errno, e.strerror, written)
-
-    def tell(self):
-        return self.raw.tell() + len(self._write_buf)
-
-    def seek(self, pos, whence=0):
-        with self._write_lock:
-            self._flush_unlocked()
-            return self.raw.seek(pos, whence)
-
-
-class BufferedRWPair(BufferedIOBase):
-
-    """A buffered reader and writer object together.
-
-    A buffered reader object and buffered writer object put together to
-    form a sequential IO object that can read and write. This is typically
-    used with a socket or two-way pipe.
-
-    reader and writer are RawIOBase objects that are readable and
-    writeable respectively. If the buffer_size is omitted it defaults to
-    DEFAULT_BUFFER_SIZE. The max_buffer_size (for the buffered writer)
-    defaults to twice the buffer size.
-    """
-
-    # XXX The usefulness of this (compared to having two separate IO
-    # objects) is questionable.
-
-    def __init__(self, reader, writer,
-                 buffer_size=DEFAULT_BUFFER_SIZE, max_buffer_size=None):
-        """Constructor.
-
-        The arguments are two RawIO instances.
-        """
-        reader._checkReadable()
-        writer._checkWritable()
-        self.reader = BufferedReader(reader, buffer_size)
-        self.writer = BufferedWriter(writer, buffer_size, max_buffer_size)
-
-    def read(self, n=None):
-        if n is None:
-            n = -1
-        return self.reader.read(n)
-
-    def readinto(self, b):
-        return self.reader.readinto(b)
-
-    def write(self, b):
-        return self.writer.write(b)
-
-    def peek(self, n=0):
-        return self.reader.peek(n)
-
-    def read1(self, n):
-        return self.reader.read1(n)
-
-    def readable(self):
-        return self.reader.readable()
-
-    def writable(self):
-        return self.writer.writable()
-
-    def flush(self):
-        return self.writer.flush()
-
-    def close(self):
-        self.writer.close()
-        self.reader.close()
-
-    def isatty(self):
-        return self.reader.isatty() or self.writer.isatty()
-
-    @property
-    def closed(self):
-        return self.writer.closed
-
-
-class BufferedRandom(BufferedWriter, BufferedReader):
-
-    """A buffered interface to random access streams.
-
-    The constructor creates a reader and writer for a seekable stream,
-    raw, given in the first argument. If the buffer_size is omitted it
-    defaults to DEFAULT_BUFFER_SIZE. The max_buffer_size (for the buffered
-    writer) defaults to twice the buffer size.
-    """
-
-    def __init__(self, raw,
-                 buffer_size=DEFAULT_BUFFER_SIZE, max_buffer_size=None):
-        raw._checkSeekable()
-        BufferedReader.__init__(self, raw, buffer_size)
-        BufferedWriter.__init__(self, raw, buffer_size, max_buffer_size)
-
-    def seek(self, pos, whence=0):
-        self.flush()
-        # First do the raw seek, then empty the read buffer, so that
-        # if the raw seek fails, we don't lose buffered data forever.
-        pos = self.raw.seek(pos, whence)
-        with self._read_lock:
-            self._reset_read_buf()
-        return pos
-
-    def tell(self):
-        if self._write_buf:
-            return self.raw.tell() + len(self._write_buf)
-        else:
-            return BufferedReader.tell(self)
-
-    def truncate(self, pos=None):
-        if pos is None:
-            pos = self.tell()
-        # Use seek to flush the read buffer.
-        self.seek(pos)
-        return BufferedWriter.truncate(self)
-
-    def read(self, n=None):
-        if n is None:
-            n = -1
-        self.flush()
-        return BufferedReader.read(self, n)
-
-    def readinto(self, b):
-        self.flush()
-        return BufferedReader.readinto(self, b)
-
-    def peek(self, n=0):
-        self.flush()
-        return BufferedReader.peek(self, n)
-
-    def read1(self, n):
-        self.flush()
-        return BufferedReader.read1(self, n)
-
-    def write(self, b):
-        if self._read_buf:
-            # Undo readahead
-            with self._read_lock:
-                self.raw.seek(self._read_pos - len(self._read_buf), 1)
-                self._reset_read_buf()
-        return BufferedWriter.write(self, b)
-
-
-class TextIOBase(IOBase):
-
-    """Base class for text I/O.
-
-    This class provides a character and line based interface to stream
-    I/O. There is no readinto method because Python's character strings
-    are immutable. There is no public constructor.
-    """
-
-    def read(self, n = -1):
-        """Read at most n characters from stream.
-
-        Read from underlying buffer until we have n characters or we hit EOF.
-        If n is negative or omitted, read until EOF.
-        """
-        self._unsupported("read")
-
-    def write(self, s):
-        """Write string s to stream."""
-        self._unsupported("write")
-
-    def truncate(self, pos = None):
-        """Truncate size to pos."""
-        self._unsupported("truncate")
-
-    def readline(self):
-        """Read until newline or EOF.
-
-        Returns an empty string if EOF is hit immediately.
-        """
-        self._unsupported("readline")
-
-    @property
-    def encoding(self):
-        """Subclasses should override."""
-        return None
-
-    @property
-    def newlines(self):
-        """Line endings translated so far.
-
-        Only line endings translated during reading are considered.
-
-        Subclasses should override.
-        """
-        return None
-
-
-class IncrementalNewlineDecoder(codecs.IncrementalDecoder):
-    """Codec used when reading a file in universal newlines mode.
-    It wraps another incremental decoder, translating \\r\\n and \\r into \\n.
-    It also records the types of newlines encountered.
-    When used with translate=False, it ensures that the newline sequence is
-    returned in one piece.
-    """
-    def __init__(self, decoder, translate, errors='strict'):
-        codecs.IncrementalDecoder.__init__(self, errors=errors)
-        self.translate = translate
-        self.decoder = decoder
-        self.seennl = 0
-        self.pendingcr = False
-
-    def decode(self, input, final=False):
-        # decode input (with the eventual \r from a previous pass)
-        output = self.decoder.decode(input, final=final)
-        if self.pendingcr and (output or final):
-            output = "\r" + output
-            self.pendingcr = False
-
-        # retain last \r even when not translating data:
-        # then readline() is sure to get \r\n in one pass
-        if output.endswith("\r") and not final:
-            output = output[:-1]
-            self.pendingcr = True
-
-        # Record which newlines are read
-        crlf = output.count('\r\n')
-        cr = output.count('\r') - crlf
-        lf = output.count('\n') - crlf
-        self.seennl |= (lf and self._LF) | (cr and self._CR) \
-                    | (crlf and self._CRLF)
-
-        if self.translate:
-            if crlf:
-                output = output.replace("\r\n", "\n")
-            if cr:
-                output = output.replace("\r", "\n")
-
-        return output
-
-    def getstate(self):
-        buf, flag = self.decoder.getstate()
-        flag <<= 1
-        if self.pendingcr:
-            flag |= 1
-        return buf, flag
-
-    def setstate(self, state):
-        buf, flag = state
-        self.pendingcr = bool(flag & 1)
-        self.decoder.setstate((buf, flag >> 1))
-
-    def reset(self):
-        self.seennl = 0
-        self.pendingcr = False
-        self.decoder.reset()
-
-    _LF = 1
-    _CR = 2
-    _CRLF = 4
-
-    @property
-    def newlines(self):
-        return (None,
-                "\n",
-                "\r",
-                ("\r", "\n"),
-                "\r\n",
-                ("\n", "\r\n"),
-                ("\r", "\r\n"),
-                ("\r", "\n", "\r\n")
-               )[self.seennl]
-
-
-class TextIOWrapper(TextIOBase):
-
-    r"""Character and line based layer over a BufferedIOBase object, buffer.
-
-    encoding gives the name of the encoding that the stream will be
-    decoded or encoded with. It defaults to locale.getpreferredencoding.
-
-    errors determines the strictness of encoding and decoding (see the
-    codecs.register) and defaults to "strict".
-
-    newline can be None, '', '\n', '\r', or '\r\n'.  It controls the
-    handling of line endings. If it is None, universal newlines is
-    enabled.  With this enabled, on input, the lines endings '\n', '\r',
-    or '\r\n' are translated to '\n' before being returned to the
-    caller. Conversely, on output, '\n' is translated to the system
-    default line separator, os.linesep. If newline is any other of its
-    legal values, that newline becomes the newline when the file is read
-    and it is returned untranslated. On output, '\n' is converted to the
-    newline.
-
-    If line_buffering is True, a call to flush is implied when a call to
-    write contains a newline character.
-    """
-
-    _CHUNK_SIZE = 128
-
-    def __init__(self, buffer, encoding=None, errors=None, newline=None,
-                 line_buffering=False):
-        if newline not in (None, "", "\n", "\r", "\r\n"):
-            raise ValueError("illegal newline value: %r" % (newline,))
-        if encoding is None:
-            try:
-                encoding = os.device_encoding(buffer.fileno())
-            except (AttributeError, UnsupportedOperation):
-                pass
-            if encoding is None:
-                try:
-                    import locale
-                except ImportError:
-                    # Importing locale may fail if Python is being built
-                    encoding = "ascii"
-                else:
-                    encoding = locale.getpreferredencoding()
-
-        if not isinstance(encoding, basestring):
-            raise ValueError("invalid encoding: %r" % encoding)
-
-        if errors is None:
-            errors = "strict"
-        else:
-            if not isinstance(errors, basestring):
-                raise ValueError("invalid errors: %r" % errors)
-
-        self.buffer = buffer
-        self._line_buffering = line_buffering
-        self._encoding = encoding
-        self._errors = errors
-        self._readuniversal = not newline
-        self._readtranslate = newline is None
-        self._readnl = newline
-        self._writetranslate = newline != ''
-        self._writenl = newline or os.linesep
-        self._encoder = None
-        self._decoder = None
-        self._decoded_chars = ''  # buffer for text returned from decoder
-        self._decoded_chars_used = 0  # offset into _decoded_chars for read()
-        self._snapshot = None  # info for reconstructing decoder state
-        self._seekable = self._telling = self.buffer.seekable()
-
-    # self._snapshot is either None, or a tuple (dec_flags, next_input)
-    # where dec_flags is the second (integer) item of the decoder state
-    # and next_input is the chunk of input bytes that comes next after the
-    # snapshot point.  We use this to reconstruct decoder states in tell().
-
-    # Naming convention:
-    #   - "bytes_..." for integer variables that count input bytes
-    #   - "chars_..." for integer variables that count decoded characters
-
-    @property
-    def encoding(self):
-        return self._encoding
-
-    @property
-    def errors(self):
-        return self._errors
-
-    @property
-    def line_buffering(self):
-        return self._line_buffering
-
-    def seekable(self):
-        return self._seekable
-
-    def readable(self):
-        return self.buffer.readable()
-
-    def writable(self):
-        return self.buffer.writable()
-
-    def flush(self):
-        self.buffer.flush()
-        self._telling = self._seekable
-
-    def close(self):
-        try:
-            self.flush()
-        except:
-            pass  # If flush() fails, just give up
-        self.buffer.close()
-
-    @property
-    def closed(self):
-        return self.buffer.closed
-
-    @property
-    def name(self):
-        return self.buffer.name
-
-    def fileno(self):
-        return self.buffer.fileno()
-
-    def isatty(self):
-        return self.buffer.isatty()
-
-    def write(self, s):
-        if self.closed:
-            raise ValueError("write to closed file")
-        if not isinstance(s, unicode):
-            raise TypeError("can't write %s to text stream" %
-                            s.__class__.__name__)
-        length = len(s)
-        haslf = (self._writetranslate or self._line_buffering) and "\n" in s
-        if haslf and self._writetranslate and self._writenl != "\n":
-            s = s.replace("\n", self._writenl)
-        encoder = self._encoder or self._get_encoder()
-        # XXX What if we were just reading?
-        b = encoder.encode(s)
-        self.buffer.write(b)
-        if self._line_buffering and (haslf or "\r" in s):
-            self.flush()
-        self._snapshot = None
-        if self._decoder:
-            self._decoder.reset()
-        return length
-
-    def _get_encoder(self):
-        make_encoder = codecs.getincrementalencoder(self._encoding)
-        self._encoder = make_encoder(self._errors)
-        return self._encoder
-
-    def _get_decoder(self):
-        make_decoder = codecs.getincrementaldecoder(self._encoding)
-        decoder = make_decoder(self._errors)
-        if self._readuniversal:
-            decoder = IncrementalNewlineDecoder(decoder, self._readtranslate)
-        self._decoder = decoder
-        return decoder
-
-    # The following three methods implement an ADT for _decoded_chars.
-    # Text returned from the decoder is buffered here until the client
-    # requests it by calling our read() or readline() method.
-    def _set_decoded_chars(self, chars):
-        """Set the _decoded_chars buffer."""
-        self._decoded_chars = chars
-        self._decoded_chars_used = 0
-
-    def _get_decoded_chars(self, n=None):
-        """Advance into the _decoded_chars buffer."""
-        offset = self._decoded_chars_used
-        if n is None:
-            chars = self._decoded_chars[offset:]
-        else:
-            chars = self._decoded_chars[offset:offset + n]
-        self._decoded_chars_used += len(chars)
-        return chars
-
-    def _rewind_decoded_chars(self, n):
-        """Rewind the _decoded_chars buffer."""
-        if self._decoded_chars_used < n:
-            raise AssertionError("rewind decoded_chars out of bounds")
-        self._decoded_chars_used -= n
-
-    def _read_chunk(self):
-        """
-        Read and decode the next chunk of data from the BufferedReader.
-
-        The return value is True unless EOF was reached.  The decoded string
-        is placed in self._decoded_chars (replacing its previous value).
-        The entire input chunk is sent to the decoder, though some of it
-        may remain buffered in the decoder, yet to be converted.
-        """
-
-        if self._decoder is None:
-            raise ValueError("no decoder")
-
-        if self._telling:
-            # To prepare for tell(), we need to snapshot a point in the
-            # file where the decoder's input buffer is empty.
-
-            dec_buffer, dec_flags = self._decoder.getstate()
-            # Given this, we know there was a valid snapshot point
-            # len(dec_buffer) bytes ago with decoder state (b'', dec_flags).
-
-        # Read a chunk, decode it, and put the result in self._decoded_chars.
-        input_chunk = self.buffer.read1(self._CHUNK_SIZE)
-        eof = not input_chunk
-        self._set_decoded_chars(self._decoder.decode(input_chunk, eof))
-
-        if self._telling:
-            # At the snapshot point, len(dec_buffer) bytes before the read,
-            # the next input to be decoded is dec_buffer + input_chunk.
-            self._snapshot = (dec_flags, dec_buffer + input_chunk)
-
-        return not eof
-
-    def _pack_cookie(self, position, dec_flags=0,
-                           bytes_to_feed=0, need_eof=0, chars_to_skip=0):
-        # The meaning of a tell() cookie is: seek to position, set the
-        # decoder flags to dec_flags, read bytes_to_feed bytes, feed them
-        # into the decoder with need_eof as the EOF flag, then skip
-        # chars_to_skip characters of the decoded result.  For most simple
-        # decoders, tell() will often just give a byte offset in the file.
-        return (position | (dec_flags<<64) | (bytes_to_feed<<128) |
-               (chars_to_skip<<192) | bool(need_eof)<<256)
-
-    def _unpack_cookie(self, bigint):
-        rest, position = divmod(bigint, 1<<64)
-        rest, dec_flags = divmod(rest, 1<<64)
-        rest, bytes_to_feed = divmod(rest, 1<<64)
-        need_eof, chars_to_skip = divmod(rest, 1<<64)
-        return position, dec_flags, bytes_to_feed, need_eof, chars_to_skip
-
-    def tell(self):
-        if not self._seekable:
-            raise IOError("underlying stream is not seekable")
-        if not self._telling:
-            raise IOError("telling position disabled by next() call")
-        self.flush()
-        position = self.buffer.tell()
-        decoder = self._decoder
-        if decoder is None or self._snapshot is None:
-            if self._decoded_chars:
-                # This should never happen.
-                raise AssertionError("pending decoded text")
-            return position
-
-        # Skip backward to the snapshot point (see _read_chunk).
-        dec_flags, next_input = self._snapshot
-        position -= len(next_input)
-
-        # How many decoded characters have been used up since the snapshot?
-        chars_to_skip = self._decoded_chars_used
-        if chars_to_skip == 0:
-            # We haven't moved from the snapshot point.
-            return self._pack_cookie(position, dec_flags)
-
-        # Starting from the snapshot position, we will walk the decoder
-        # forward until it gives us enough decoded characters.
-        saved_state = decoder.getstate()
-        try:
-            # Note our initial start point.
-            decoder.setstate((b'', dec_flags))
-            start_pos = position
-            start_flags, bytes_fed, chars_decoded = dec_flags, 0, 0
-            need_eof = 0
-
-            # Feed the decoder one byte at a time.  As we go, note the
-            # nearest "safe start point" before the current location
-            # (a point where the decoder has nothing buffered, so seek()
-            # can safely start from there and advance to this location).
-            for next_byte in next_input:
-                bytes_fed += 1
-                chars_decoded += len(decoder.decode(next_byte))
-                dec_buffer, dec_flags = decoder.getstate()
-                if not dec_buffer and chars_decoded <= chars_to_skip:
-                    # Decoder buffer is empty, so this is a safe start point.
-                    start_pos += bytes_fed
-                    chars_to_skip -= chars_decoded
-                    start_flags, bytes_fed, chars_decoded = dec_flags, 0, 0
-                if chars_decoded >= chars_to_skip:
-                    break
-            else:
-                # We didn't get enough decoded data; signal EOF to get more.
-                chars_decoded += len(decoder.decode(b'', final=True))
-                need_eof = 1
-                if chars_decoded < chars_to_skip:
-                    raise IOError("can't reconstruct logical file position")
-
-            # The returned cookie corresponds to the last safe start point.
-            return self._pack_cookie(
-                start_pos, start_flags, bytes_fed, need_eof, chars_to_skip)
-        finally:
-            decoder.setstate(saved_state)
-
-    def truncate(self, pos=None):
-        self.flush()
-        if pos is None:
-            pos = self.tell()
-        self.seek(pos)
-        return self.buffer.truncate()
-
-    def seek(self, cookie, whence=0):
-        if self.closed:
-            raise ValueError("tell on closed file")
-        if not self._seekable:
-            raise IOError("underlying stream is not seekable")
-        if whence == 1: # seek relative to current position
-            if cookie != 0:
-                raise IOError("can't do nonzero cur-relative seeks")
-            # Seeking to the current position should attempt to
-            # sync the underlying buffer with the current position.
-            whence = 0
-            cookie = self.tell()
-        if whence == 2: # seek relative to end of file
-            if cookie != 0:
-                raise IOError("can't do nonzero end-relative seeks")
-            self.flush()
-            position = self.buffer.seek(0, 2)
-            self._set_decoded_chars('')
-            self._snapshot = None
-            if self._decoder:
-                self._decoder.reset()
-            return position
-        if whence != 0:
-            raise ValueError("invalid whence (%r, should be 0, 1 or 2)" %
-                             (whence,))
-        if cookie < 0:
-            raise ValueError("negative seek position %r" % (cookie,))
-        self.flush()
-
-        # The strategy of seek() is to go back to the safe start point
-        # and replay the effect of read(chars_to_skip) from there.
-        start_pos, dec_flags, bytes_to_feed, need_eof, chars_to_skip = \
-            self._unpack_cookie(cookie)
-
-        # Seek back to the safe start point.
-        self.buffer.seek(start_pos)
-        self._set_decoded_chars('')
-        self._snapshot = None
-
-        # Restore the decoder to its state from the safe start point.
-        if self._decoder or dec_flags or chars_to_skip:
-            self._decoder = self._decoder or self._get_decoder()
-            self._decoder.setstate((b'', dec_flags))
-            self._snapshot = (dec_flags, b'')
-
-        if chars_to_skip:
-            # Just like _read_chunk, feed the decoder and save a snapshot.
-            input_chunk = self.buffer.read(bytes_to_feed)
-            self._set_decoded_chars(
-                self._decoder.decode(input_chunk, need_eof))
-            self._snapshot = (dec_flags, input_chunk)
-
-            # Skip chars_to_skip of the decoded characters.
-            if len(self._decoded_chars) < chars_to_skip:
-                raise IOError("can't restore logical file position")
-            self._decoded_chars_used = chars_to_skip
-
-        return cookie
-
-    def read(self, n=None):
-        if n is None:
-            n = -1
-        decoder = self._decoder or self._get_decoder()
-        if n < 0:
-            # Read everything.
-            result = (self._get_decoded_chars() +
-                      decoder.decode(self.buffer.read(), final=True))
-            self._set_decoded_chars('')
-            self._snapshot = None
-            return result
-        else:
-            # Keep reading chunks until we have n characters to return.
-            eof = False
-            result = self._get_decoded_chars(n)
-            while len(result) < n and not eof:
-                eof = not self._read_chunk()
-                result += self._get_decoded_chars(n - len(result))
-            return result
-
-    def next(self):
-        self._telling = False
-        line = self.readline()
-        if not line:
-            self._snapshot = None
-            self._telling = self._seekable
-            raise StopIteration
-        return line
-
-    def readline(self, limit=None):
-        if self.closed:
-            raise ValueError("read from closed file")
-        if limit is None:
-            limit = -1
-        if not isinstance(limit, (int, long)):
-            raise TypeError("limit must be an integer")
-
-        # Grab all the decoded text (we will rewind any extra bits later).
-        line = self._get_decoded_chars()
-
-        start = 0
-        decoder = self._decoder or self._get_decoder()
-
-        pos = endpos = None
-        while True:
-            if self._readtranslate:
-                # Newlines are already translated, only search for \n
-                pos = line.find('\n', start)
-                if pos >= 0:
-                    endpos = pos + 1
-                    break
-                else:
-                    start = len(line)
-
-            elif self._readuniversal:
-                # Universal newline search. Find any of \r, \r\n, \n
-                # The decoder ensures that \r\n are not split in two pieces
-
-                # In C we'd look for these in parallel of course.
-                nlpos = line.find("\n", start)
-                crpos = line.find("\r", start)
-                if crpos == -1:
-                    if nlpos == -1:
-                        # Nothing found
-                        start = len(line)
-                    else:
-                        # Found \n
-                        endpos = nlpos + 1
-                        break
-                elif nlpos == -1:
-                    # Found lone \r
-                    endpos = crpos + 1
-                    break
-                elif nlpos < crpos:
-                    # Found \n
-                    endpos = nlpos + 1
-                    break
-                elif nlpos == crpos + 1:
-                    # Found \r\n
-                    endpos = crpos + 2
-                    break
-                else:
-                    # Found \r
-                    endpos = crpos + 1
-                    break
-            else:
-                # non-universal
-                pos = line.find(self._readnl)
-                if pos >= 0:
-                    endpos = pos + len(self._readnl)
-                    break
-
-            if limit >= 0 and len(line) >= limit:
-                endpos = limit  # reached length limit
-                break
-
-            # No line ending seen yet - get more data
-            more_line = ''
-            while self._read_chunk():
-                if self._decoded_chars:
-                    break
-            if self._decoded_chars:
-                line += self._get_decoded_chars()
-            else:
-                # end of file
-                self._set_decoded_chars('')
-                self._snapshot = None
-                return line
-
-        if limit >= 0 and endpos > limit:
-            endpos = limit  # don't exceed limit
-
-        # Rewind _decoded_chars to just after the line ending we found.
-        self._rewind_decoded_chars(len(line) - endpos)
-        return line[:endpos]
-
-    @property
-    def newlines(self):
-        return self._decoder.newlines if self._decoder else None
-
-class StringIO(TextIOWrapper):
-
-    """An in-memory stream for text. The initial_value argument sets the
-    value of object. The other arguments are like those of TextIOWrapper's
-    constructor.
-    """
-
-    def __init__(self, initial_value="", encoding="utf-8",
-                 errors="strict", newline="\n"):
-        super(StringIO, self).__init__(BytesIO(),
-                                       encoding=encoding,
-                                       errors=errors,
-                                       newline=newline)
-        if initial_value:
-            if not isinstance(initial_value, unicode):
-                initial_value = unicode(initial_value)
-            self.write(initial_value)
-            self.seek(0)
-
-    def getvalue(self):
-        self.flush()
-        return self.buffer.getvalue().decode(self._encoding, self._errors)
+for klass in (BytesIO, BufferedReader, BufferedWriter, BufferedRandom,
+              BufferedRWPair):
+    BufferedIOBase.register(klass)
+
+for klass in (StringIO, TextIOWrapper):
+    TextIOBase.register(klass)
+del klass

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/Grammar.txt
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/Grammar.txt	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/Grammar.txt	Sat Jun 20 00:11:15 2009
@@ -90,7 +90,8 @@
 	    ['else' ':' suite]
 	    ['finally' ':' suite] |
 	   'finally' ':' suite))
-with_stmt: 'with' test [ with_var ] ':' suite
+with_stmt: 'with' with_item (',' with_item)*  ':' suite
+with_item: test ['as' expr]
 with_var: 'as' expr
 # NB compile.c makes sure that the default except clause is last
 except_clause: 'except' [test [(',' | 'as') test]]

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixer_base.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixer_base.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixer_base.py	Sat Jun 20 00:11:15 2009
@@ -120,7 +120,7 @@
         """
         lineno = node.get_lineno()
         for_output = node.clone()
-        for_output.set_prefix(u"")
+        for_output.prefix = u""
         msg = "Line %d: could not convert: %s"
         self.log_message(msg % (lineno, for_output))
         if reason:

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixer_util.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixer_util.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixer_util.py	Sat Jun 20 00:11:15 2009
@@ -27,11 +27,11 @@
     if not isinstance(target, list):
         target = [target]
     if not isinstance(source, list):
-        source.set_prefix(" ")
+        source.prefix = u" "
         source = [source]
 
     return Node(syms.atom,
-                target + [Leaf(token.EQUAL, "=", prefix=" ")] + source)
+                target + [Leaf(token.EQUAL, u"=", prefix=u" ")] + source)
 
 def Name(name, prefix=None):
     """Return a NAME leaf"""
@@ -60,7 +60,7 @@
     """A function call"""
     node = Node(syms.power, [func_name, ArgList(args)])
     if prefix is not None:
-        node.set_prefix(prefix)
+        node.prefix = prefix
     return node
 
 def Newline():
@@ -89,18 +89,18 @@
 
     If test is None, the "if test" part is omitted.
     """
-    xp.set_prefix(u"")
-    fp.set_prefix(u" ")
-    it.set_prefix(u" ")
+    xp.prefix = u""
+    fp.prefix = u" "
+    it.prefix = u" "
     for_leaf = Leaf(token.NAME, u"for")
-    for_leaf.set_prefix(u" ")
+    for_leaf.prefix = u" "
     in_leaf = Leaf(token.NAME, u"in")
-    in_leaf.set_prefix(u" ")
+    in_leaf.prefix = u" "
     inner_args = [for_leaf, fp, in_leaf, it]
     if test:
-        test.set_prefix(u" ")
+        test.prefix = u" "
         if_leaf = Leaf(token.NAME, u"if")
-        if_leaf.set_prefix(u" ")
+        if_leaf.prefix = u" "
         inner_args.append(Node(syms.comp_if, [if_leaf, test]))
     inner = Node(syms.listmaker, [xp, Node(syms.comp_for, inner_args)])
     return Node(syms.atom,

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_apply.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_apply.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_apply.py	Sat Jun 20 00:11:15 2009
@@ -33,25 +33,25 @@
         func = results["func"]
         args = results["args"]
         kwds = results.get("kwds")
-        prefix = node.get_prefix()
+        prefix = node.prefix
         func = func.clone()
         if (func.type not in (token.NAME, syms.atom) and
             (func.type != syms.power or
              func.children[-2].type == token.DOUBLESTAR)):
             # Need to parenthesize
             func = parenthesize(func)
-        func.set_prefix("")
+        func.prefix = ""
         args = args.clone()
-        args.set_prefix("")
+        args.prefix = ""
         if kwds is not None:
             kwds = kwds.clone()
-            kwds.set_prefix("")
+            kwds.prefix = ""
         l_newargs = [pytree.Leaf(token.STAR, u"*"), args]
         if kwds is not None:
             l_newargs.extend([Comma(),
                               pytree.Leaf(token.DOUBLESTAR, u"**"),
                               kwds])
-            l_newargs[-2].set_prefix(u" ") # that's the ** token
+            l_newargs[-2].prefix = u" " # that's the ** token
         # XXX Sometimes we could be cleverer, e.g. apply(f, (x, y) + t)
         # can be translated into f(x, y, *t) instead of f(*(x, y) + t)
         #new = pytree.Node(syms.power, (func, ArgList(l_newargs)))

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_basestring.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_basestring.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_basestring.py	Sat Jun 20 00:11:15 2009
@@ -10,4 +10,4 @@
     PATTERN = "'basestring'"
 
     def transform(self, node, results):
-        return Name(u"str", prefix=node.get_prefix())
+        return Name(u"str", prefix=node.prefix)

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_buffer.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_buffer.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_buffer.py	Sat Jun 20 00:11:15 2009
@@ -13,9 +13,9 @@
     explicit = True # The user must ask for this fixer
 
     PATTERN = """
-              power< name='buffer' trailer< '(' [any] ')' > >
+              power< name='buffer' trailer< '(' [any] ')' > any* >
               """
 
     def transform(self, node, results):
         name = results["name"]
-        name.replace(Name(u"memoryview", prefix=name.get_prefix()))
+        name.replace(Name(u"memoryview", prefix=name.prefix))

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_callable.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_callable.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_callable.py	Sat Jun 20 00:11:15 2009
@@ -28,4 +28,4 @@
         func = results["func"]
 
         args = [func.clone(), String(u', '), String(u"'__call__'")]
-        return Call(Name(u"hasattr"), args, prefix=node.get_prefix())
+        return Call(Name(u"hasattr"), args, prefix=node.prefix)

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_dict.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_dict.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_dict.py	Sat Jun 20 00:11:15 2009
@@ -61,15 +61,15 @@
         args = head + [pytree.Node(syms.trailer,
                                    [Dot(),
                                     Name(method_name,
-                                         prefix=method.get_prefix())]),
+                                         prefix=method.prefix)]),
                        results["parens"].clone()]
         new = pytree.Node(syms.power, args)
         if not special:
-            new.set_prefix(u"")
+            new.prefix = u""
             new = Call(Name(isiter and u"iter" or u"list"), [new])
         if tail:
             new = pytree.Node(syms.power, [new] + tail)
-        new.set_prefix(node.get_prefix())
+        new.prefix = node.prefix
         return new
 
     P1 = "power< func=NAME trailer< '(' node=any ')' > any* >"

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_except.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_except.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_except.py	Sat Jun 20 00:11:15 2009
@@ -36,11 +36,11 @@
 class FixExcept(fixer_base.BaseFix):
 
     PATTERN = """
-    try_stmt< 'try' ':' suite
-                  cleanup=(except_clause ':' suite)+
-                  tail=(['except' ':' suite]
-                        ['else' ':' suite]
-                        ['finally' ':' suite]) >
+    try_stmt< 'try' ':' (simple_stmt | suite)
+                  cleanup=(except_clause ':' (simple_stmt | suite))+
+                  tail=(['except' ':' (simple_stmt | suite)]
+                        ['else' ':' (simple_stmt | suite)]
+                        ['finally' ':' (simple_stmt | suite)]) >
     """
 
     def transform(self, node, results):
@@ -58,7 +58,7 @@
                     # Generate a new N for the except clause
                     new_N = Name(self.new_name(), prefix=u" ")
                     target = N.clone()
-                    target.set_prefix(u"")
+                    target.prefix = u""
                     N.replace(new_N)
                     new_N = new_N.clone()
 
@@ -82,10 +82,10 @@
                     for child in reversed(suite_stmts[:i]):
                         e_suite.insert_child(0, child)
                     e_suite.insert_child(i, assign)
-                elif N.get_prefix() == u"":
+                elif N.prefix == u"":
                     # No space after a comma is legal; no space after "as",
                     # not so much.
-                    N.set_prefix(u" ")
+                    N.prefix = u" "
 
         #TODO(cwinter) fix this when children becomes a smart list
         children = [c.clone() for c in node.children[:3]] + try_cleanup + tail

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_exec.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_exec.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_exec.py	Sat Jun 20 00:11:15 2009
@@ -30,10 +30,10 @@
         b = results.get("b")
         c = results.get("c")
         args = [a.clone()]
-        args[0].set_prefix("")
+        args[0].prefix = ""
         if b is not None:
             args.extend([Comma(), b.clone()])
         if c is not None:
             args.extend([Comma(), c.clone()])
 
-        return Call(Name(u"exec"), args, prefix=node.get_prefix())
+        return Call(Name(u"exec"), args, prefix=node.prefix)

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_execfile.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_execfile.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_execfile.py	Sat Jun 20 00:11:15 2009
@@ -38,7 +38,7 @@
         # Wrap the open call in a compile call. This is so the filename will be
         # preserved in the execed code.
         filename_arg = filename.clone()
-        filename_arg.set_prefix(u" ")
+        filename_arg.prefix = u" "
         exec_str = String(u"'exec'", u" ")
         compile_args = open_expr + [Comma(), filename_arg, Comma(), exec_str]
         compile_call = Call(Name(u"compile"), compile_args, u"")
@@ -48,4 +48,4 @@
             args.extend([Comma(), globals.clone()])
         if locals is not None:
             args.extend([Comma(), locals.clone()])
-        return Call(Name(u"exec"), args, prefix=node.get_prefix())
+        return Call(Name(u"exec"), args, prefix=node.prefix)

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_filter.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_filter.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_filter.py	Sat Jun 20 00:11:15 2009
@@ -69,7 +69,7 @@
             if in_special_context(node):
                 return None
             new = node.clone()
-            new.set_prefix(u"")
+            new.prefix = u""
             new = Call(Name(u"list"), [new])
-        new.set_prefix(node.get_prefix())
+        new.prefix = node.prefix
         return new

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_funcattrs.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_funcattrs.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_funcattrs.py	Sat Jun 20 00:11:15 2009
@@ -16,4 +16,4 @@
     def transform(self, node, results):
         attr = results["attr"][0]
         attr.replace(Name((u"__%s__" % attr.value[5:]),
-                          prefix=attr.get_prefix()))
+                          prefix=attr.prefix))

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_future.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_future.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_future.py	Sat Jun 20 00:11:15 2009
@@ -16,5 +16,5 @@
 
     def transform(self, node, results):
         new = BlankLine()
-        new.prefix = node.get_prefix()
+        new.prefix = node.prefix
         return new

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_getcwdu.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_getcwdu.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_getcwdu.py	Sat Jun 20 00:11:15 2009
@@ -15,4 +15,4 @@
 
     def transform(self, node, results):
         name = results["name"]
-        name.replace(Name(u"getcwd", prefix=name.get_prefix()))
+        name.replace(Name(u"getcwd", prefix=name.prefix))

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_has_key.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_has_key.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_has_key.py	Sat Jun 20 00:11:15 2009
@@ -78,7 +78,7 @@
             return None
         negation = results.get("negation")
         anchor = results["anchor"]
-        prefix = node.get_prefix()
+        prefix = node.prefix
         before = [n.clone() for n in results["before"]]
         arg = results["arg"].clone()
         after = results.get("after")
@@ -91,7 +91,7 @@
             before = before[0]
         else:
             before = pytree.Node(syms.power, before)
-        before.set_prefix(u" ")
+        before.prefix = u" "
         n_op = Name(u"in", prefix=u" ")
         if negation:
             n_not = Name(u"not", prefix=u" ")
@@ -105,5 +105,5 @@
                                 syms.arith_expr, syms.term,
                                 syms.factor, syms.power):
             new = parenthesize(new)
-        new.set_prefix(prefix)
+        new.prefix = prefix
         return new

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_idioms.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_idioms.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_idioms.py	Sat Jun 20 00:11:15 2009
@@ -101,18 +101,18 @@
     def transform_isinstance(self, node, results):
         x = results["x"].clone() # The thing inside of type()
         T = results["T"].clone() # The type being compared against
-        x.set_prefix("")
-        T.set_prefix(" ")
-        test = Call(Name("isinstance"), [x, Comma(), T])
+        x.prefix = u""
+        T.prefix = u" "
+        test = Call(Name(u"isinstance"), [x, Comma(), T])
         if "n" in results:
-            test.set_prefix(u" ")
+            test.prefix = u" "
             test = Node(syms.not_test, [Name(u"not"), test])
-        test.set_prefix(node.get_prefix())
+        test.prefix = node.prefix
         return test
 
     def transform_while(self, node, results):
         one = results["while"]
-        one.replace(Name(u"True", prefix=one.get_prefix()))
+        one.replace(Name(u"True", prefix=one.prefix))
 
     def transform_sort(self, node, results):
         sort_stmt = results["sort"]
@@ -121,14 +121,14 @@
         simple_expr = results.get("expr")
 
         if list_call:
-            list_call.replace(Name(u"sorted", prefix=list_call.get_prefix()))
+            list_call.replace(Name(u"sorted", prefix=list_call.prefix))
         elif simple_expr:
             new = simple_expr.clone()
-            new.set_prefix(u"")
+            new.prefix = u""
             simple_expr.replace(Call(Name(u"sorted"), [new],
-                                     prefix=simple_expr.get_prefix()))
+                                     prefix=simple_expr.prefix))
         else:
             raise RuntimeError("should not have reached here")
         sort_stmt.remove()
         if next_stmt:
-            next_stmt[0].set_prefix(sort_stmt.get_prefix())
+            next_stmt[0].prefix = sort_stmt.prefix

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_import.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_import.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_import.py	Sat Jun 20 00:11:15 2009
@@ -73,7 +73,7 @@
                 return
 
             new = FromImport('.', [imp])
-            new.set_prefix(node.get_prefix())
+            new.prefix = node.prefix
             return new
 
     def probably_a_local_import(self, imp_name):

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_imports.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_imports.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_imports.py	Sat Jun 20 00:11:15 2009
@@ -124,7 +124,7 @@
         if import_mod:
             mod_name = import_mod.value
             new_name = unicode(self.mapping[mod_name])
-            import_mod.replace(Name(new_name, prefix=import_mod.get_prefix()))
+            import_mod.replace(Name(new_name, prefix=import_mod.prefix))
             if "name_import" in results:
                 # If it's not a "from x import x, y" or "import x as y" import,
                 # marked its usage to be replaced.
@@ -142,4 +142,4 @@
             bare_name = results["bare_with_attr"][0]
             new_name = self.replace.get(bare_name.value)
             if new_name:
-                bare_name.replace(Name(new_name, prefix=bare_name.get_prefix()))
+                bare_name.replace(Name(new_name, prefix=bare_name.prefix))

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_input.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_input.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_input.py	Sat Jun 20 00:11:15 2009
@@ -22,5 +22,5 @@
             return
 
         new = node.clone()
-        new.set_prefix(u"")
-        return Call(Name(u"eval"), [new], prefix=node.get_prefix())
+        new.prefix = u""
+        return Call(Name(u"eval"), [new], prefix=node.prefix)

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_intern.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_intern.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_intern.py	Sat Jun 20 00:11:15 2009
@@ -39,6 +39,6 @@
                                        [results["lpar"].clone(),
                                         newarglist,
                                         results["rpar"].clone()])] + after)
-        new.set_prefix(node.get_prefix())
+        new.prefix = node.prefix
         touch_import(None, u'sys', node)
         return new

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_isinstance.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_isinstance.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_isinstance.py	Sat Jun 20 00:11:15 2009
@@ -45,7 +45,7 @@
             del new_args[-1]
         if len(new_args) == 1:
             atom = testlist.parent
-            new_args[0].set_prefix(atom.get_prefix())
+            new_args[0].prefix = atom.prefix
             atom.replace(new_args[0])
         else:
             args[:] = new_args

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_itertools.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_itertools.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_itertools.py	Sat Jun 20 00:11:15 2009
@@ -30,12 +30,12 @@
         if 'it' in results and func.value != u'ifilterfalse':
             dot, it = (results['dot'], results['it'])
             # Remove the 'itertools'
-            prefix = it.get_prefix()
+            prefix = it.prefix
             it.remove()
             # Replace the node wich contains ('.', 'function') with the
             # function (to be consistant with the second part of the pattern)
             dot.remove()
             func.parent.replace(func)
 
-        prefix = prefix or func.get_prefix()
+        prefix = prefix or func.prefix
         func.replace(Name(func.value[1:], prefix=prefix))

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_itertools_imports.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_itertools_imports.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_itertools_imports.py	Sat Jun 20 00:11:15 2009
@@ -46,7 +46,7 @@
         # If there are no imports left, just get rid of the entire statement
         if not (imports.children or getattr(imports, 'value', None)) or \
                 imports.parent is None:
-            p = node.get_prefix()
+            p = node.prefix
             node = BlankLine()
             node.prefix = p
         return node

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_long.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_long.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_long.py	Sat Jun 20 00:11:15 2009
@@ -18,5 +18,5 @@
     def transform(self, node, results):
         if is_probably_builtin(node):
             new = self.static_int.clone()
-            new.set_prefix(node.get_prefix())
+            new.prefix = node.prefix
             return new

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_map.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_map.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_map.py	Sat Jun 20 00:11:15 2009
@@ -63,7 +63,7 @@
         if node.parent.type == syms.simple_stmt:
             self.warning(node, "You should use a for loop here")
             new = node.clone()
-            new.set_prefix(u"")
+            new.prefix = u""
             new = Call(Name(u"list"), [new])
         elif "map_lambda" in results:
             new = ListComp(results.get("xp").clone(),
@@ -76,7 +76,7 @@
                 if in_special_context(node):
                     return None
                 new = node.clone()
-            new.set_prefix(u"")
+            new.prefix = u""
             new = Call(Name(u"list"), [new])
-        new.set_prefix(node.get_prefix())
+        new.prefix = node.prefix
         return new

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_metaclass.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_metaclass.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_metaclass.py	Sat Jun 20 00:11:15 2009
@@ -89,7 +89,7 @@
     parent.insert_child(i, new_stmt)
     new_leaf1 = new_stmt.children[0].children[0]
     old_leaf1 = stmt_node.children[0].children[0]
-    new_leaf1.set_prefix(old_leaf1.get_prefix())
+    new_leaf1.prefix = old_leaf1.prefix
 
 
 def remove_trailing_newline(node):
@@ -136,7 +136,7 @@
         node = kids.pop()
         if isinstance(node, Leaf) and node.type != token.DEDENT:
             if node.prefix:
-                node.set_prefix('')
+                node.prefix = u''
             return
         else:
             kids.extend(node.children[::-1])
@@ -191,19 +191,19 @@
         # now stick the metaclass in the arglist
         meta_txt = last_metaclass.children[0].children[0]
         meta_txt.value = 'metaclass'
-        orig_meta_prefix = meta_txt.get_prefix()
+        orig_meta_prefix = meta_txt.prefix
 
         if arglist.children:
             arglist.append_child(Leaf(token.COMMA, u','))
-            meta_txt.set_prefix(u' ')
+            meta_txt.prefix = u' '
         else:
-            meta_txt.set_prefix(u'')
+            meta_txt.prefix = u''
 
         # compact the expression "metaclass = Meta" -> "metaclass=Meta"
         expr_stmt = last_metaclass.children[0]
         assert expr_stmt.type == syms.expr_stmt
-        expr_stmt.children[1].set_prefix(u'')
-        expr_stmt.children[2].set_prefix(u'')
+        expr_stmt.children[1].prefix = u''
+        expr_stmt.children[2].prefix = u''
 
         arglist.append_child(last_metaclass)
 
@@ -214,7 +214,7 @@
             # one-liner that was just __metaclass_
             suite.remove()
             pass_leaf = Leaf(text_type, u'pass')
-            pass_leaf.set_prefix(orig_meta_prefix)
+            pass_leaf.prefix = orig_meta_prefix
             node.append_child(pass_leaf)
             node.append_child(Leaf(token.NEWLINE, u'\n'))
 

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_methodattrs.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_methodattrs.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_methodattrs.py	Sat Jun 20 00:11:15 2009
@@ -20,4 +20,4 @@
     def transform(self, node, results):
         attr = results["attr"][0]
         new = unicode(MAP[attr.value])
-        attr.replace(Name(new, prefix=attr.get_prefix()))
+        attr.replace(Name(new, prefix=attr.prefix))

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_ne.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_ne.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_ne.py	Sat Jun 20 00:11:15 2009
@@ -17,6 +17,5 @@
         return node.type == token.NOTEQUAL and node.value == u"<>"
 
     def transform(self, node, results):
-        new = pytree.Leaf(token.NOTEQUAL, u"!=")
-        new.set_prefix(node.get_prefix())
+        new = pytree.Leaf(token.NOTEQUAL, u"!=", prefix=node.prefix)
         return new

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_next.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_next.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_next.py	Sat Jun 20 00:11:15 2009
@@ -48,17 +48,16 @@
         base = results.get("base")
         attr = results.get("attr")
         name = results.get("name")
-        mod = results.get("mod")
 
         if base:
             if self.shadowed_next:
-                attr.replace(Name(u"__next__", prefix=attr.get_prefix()))
+                attr.replace(Name(u"__next__", prefix=attr.prefix))
             else:
                 base = [n.clone() for n in base]
-                base[0].set_prefix(u"")
-                node.replace(Call(Name(u"next", prefix=node.get_prefix()), base))
+                base[0].prefix = u""
+                node.replace(Call(Name(u"next", prefix=node.prefix), base))
         elif name:
-            n = Name(u"__next__", prefix=name.get_prefix())
+            n = Name(u"__next__", prefix=name.prefix)
             name.replace(n)
         elif attr:
             # We don't do this transformation if we're assigning to "x.next".

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_nonzero.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_nonzero.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_nonzero.py	Sat Jun 20 00:11:15 2009
@@ -16,5 +16,5 @@
 
     def transform(self, node, results):
         name = results["name"]
-        new = Name(u"__bool__", prefix=name.get_prefix())
+        new = Name(u"__bool__", prefix=name.prefix)
         name.replace(new)

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_numliterals.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_numliterals.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_numliterals.py	Sat Jun 20 00:11:15 2009
@@ -24,4 +24,4 @@
         elif val.startswith(u'0') and val.isdigit() and len(set(val)) > 1:
             val = u"0o" + val[1:]
 
-        return Number(val, prefix=node.get_prefix())
+        return Number(val, prefix=node.prefix)

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_paren.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_paren.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_paren.py	Sat Jun 20 00:11:15 2009
@@ -36,7 +36,7 @@
         target = results["target"]
 
         lparen = LParen()
-        lparen.set_prefix(target.get_prefix())
-        target.set_prefix(u"") # Make it hug the parentheses
+        lparen.prefix = target.prefix
+        target.prefix = u"" # Make it hug the parentheses
         target.insert_child(0, lparen)
         target.append_child(RParen())

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_print.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_print.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_print.py	Sat Jun 20 00:11:15 2009
@@ -45,7 +45,7 @@
         if bare_print:
             # Special-case print all by itself
             bare_print.replace(Call(Name(u"print"), [],
-                               prefix=bare_print.get_prefix()))
+                               prefix=bare_print.prefix))
             return
         assert node.children[0] == Name(u"print")
         args = node.children[1:]
@@ -65,7 +65,7 @@
         # Now synthesize a print(args, sep=..., end=..., file=...) node.
         l_args = [arg.clone() for arg in args]
         if l_args:
-            l_args[0].set_prefix(u"")
+            l_args[0].prefix = u""
         if sep is not None or end is not None or file is not None:
             if sep is not None:
                 self.add_kwarg(l_args, u"sep", String(repr(sep)))
@@ -74,17 +74,17 @@
             if file is not None:
                 self.add_kwarg(l_args, u"file", file)
         n_stmt = Call(Name(u"print"), l_args)
-        n_stmt.set_prefix(node.get_prefix())
+        n_stmt.prefix = node.prefix
         return n_stmt
 
     def add_kwarg(self, l_nodes, s_kwd, n_expr):
         # XXX All this prefix-setting may lose comments (though rarely)
-        n_expr.set_prefix(u"")
+        n_expr.prefix = u""
         n_argument = pytree.Node(self.syms.argument,
                                  (Name(s_kwd),
                                   pytree.Leaf(token.EQUAL, u"="),
                                   n_expr))
         if l_nodes:
             l_nodes.append(Comma())
-            n_argument.set_prefix(u" ")
+            n_argument.prefix = u" "
         l_nodes.append(n_argument)

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_raise.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_raise.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_raise.py	Sat Jun 20 00:11:15 2009
@@ -52,31 +52,31 @@
                 # exc.children[1:-1] is the unparenthesized tuple
                 # exc.children[1].children[0] is the first element of the tuple
                 exc = exc.children[1].children[0].clone()
-            exc.set_prefix(" ")
+            exc.prefix = " "
 
         if "val" not in results:
             # One-argument raise
             new = pytree.Node(syms.raise_stmt, [Name(u"raise"), exc])
-            new.set_prefix(node.get_prefix())
+            new.prefix = node.prefix
             return new
 
         val = results["val"].clone()
         if is_tuple(val):
             args = [c.clone() for c in val.children[1:-1]]
         else:
-            val.set_prefix(u"")
+            val.prefix = u""
             args = [val]
 
         if "tb" in results:
             tb = results["tb"].clone()
-            tb.set_prefix(u"")
+            tb.prefix = u""
 
             e = Call(exc, args)
             with_tb = Attr(e, Name(u'with_traceback')) + [ArgList([tb])]
             new = pytree.Node(syms.simple_stmt, [Name(u"raise")] + with_tb)
-            new.set_prefix(node.get_prefix())
+            new.prefix = node.prefix
             return new
         else:
             return pytree.Node(syms.raise_stmt,
                                [Name(u"raise"), Call(exc, args)],
-                               prefix=node.get_prefix())
+                               prefix=node.prefix)

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_raw_input.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_raw_input.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_raw_input.py	Sat Jun 20 00:11:15 2009
@@ -13,4 +13,4 @@
 
     def transform(self, node, results):
         name = results["name"]
-        name.replace(Name(u"input", prefix=name.get_prefix()))
+        name.replace(Name(u"input", prefix=name.prefix))

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_renames.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_renames.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_renames.py	Sat Jun 20 00:11:15 2009
@@ -66,4 +66,4 @@
 
         if mod_name and attr_name:
             new_attr = unicode(LOOKUP[(mod_name.value, attr_name.value)])
-            attr_name.replace(Name(new_attr, prefix=attr_name.get_prefix()))
+            attr_name.replace(Name(new_attr, prefix=attr_name.prefix))

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_repr.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_repr.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_repr.py	Sat Jun 20 00:11:15 2009
@@ -19,4 +19,4 @@
 
         if expr.type == self.syms.testlist1:
             expr = parenthesize(expr)
-        return Call(Name(u"repr"), [expr], prefix=node.get_prefix())
+        return Call(Name(u"repr"), [expr], prefix=node.prefix)

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_set_literal.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_set_literal.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_set_literal.py	Sat Jun 20 00:11:15 2009
@@ -38,15 +38,15 @@
         literal.extend(n.clone() for n in items.children)
         literal.append(pytree.Leaf(token.RBRACE, u"}"))
         # Set the prefix of the right brace to that of the ')' or ']'
-        literal[-1].set_prefix(items.next_sibling.get_prefix())
+        literal[-1].prefix = items.next_sibling.prefix
         maker = pytree.Node(syms.dictsetmaker, literal)
-        maker.set_prefix(node.get_prefix())
+        maker.prefix = node.prefix
 
         # If the original was a one tuple, we need to remove the extra comma.
         if len(maker.children) == 4:
             n = maker.children[2]
             n.remove()
-            maker.children[-1].set_prefix(n.get_prefix())
+            maker.children[-1].prefix = n.prefix
 
         # Finally, replace the set call with our shiny new literal.
         return maker

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_standarderror.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_standarderror.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_standarderror.py	Sat Jun 20 00:11:15 2009
@@ -15,4 +15,4 @@
               """
 
     def transform(self, node, results):
-        return Name(u"Exception", prefix=node.get_prefix())
+        return Name(u"Exception", prefix=node.prefix)

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_sys_exc.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_sys_exc.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_sys_exc.py	Sat Jun 20 00:11:15 2009
@@ -22,8 +22,8 @@
         sys_attr = results["attribute"][0]
         index = Number(self.exc_info.index(sys_attr.value))
 
-        call = Call(Name(u"exc_info"), prefix=sys_attr.get_prefix())
+        call = Call(Name(u"exc_info"), prefix=sys_attr.prefix)
         attr = Attr(Name(u"sys"), call)
-        attr[1].children[0].set_prefix(results["dot"].get_prefix())
+        attr[1].children[0].prefix = results["dot"].prefix
         attr.append(Subscript(index))
-        return Node(syms.power, attr, prefix=node.get_prefix())
+        return Node(syms.power, attr, prefix=node.prefix)

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_throw.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_throw.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_throw.py	Sat Jun 20 00:11:15 2009
@@ -40,14 +40,14 @@
         if is_tuple(val):
             args = [c.clone() for c in val.children[1:-1]]
         else:
-            val.set_prefix(u"")
+            val.prefix = u""
             args = [val]
 
         throw_args = results["args"]
 
         if "tb" in results:
             tb = results["tb"].clone()
-            tb.set_prefix(u"")
+            tb.prefix = u""
 
             e = Call(exc, args)
             with_tb = Attr(e, Name(u'with_traceback')) + [ArgList([tb])]

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_tuple_params.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_tuple_params.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_tuple_params.py	Sat Jun 20 00:11:15 2009
@@ -63,10 +63,10 @@
         def handle_tuple(tuple_arg, add_prefix=False):
             n = Name(self.new_name())
             arg = tuple_arg.clone()
-            arg.set_prefix(u"")
+            arg.prefix = u""
             stmt = Assign(arg, n.clone())
             if add_prefix:
-                n.set_prefix(u" ")
+                n.prefix = u" "
             tuple_arg.replace(n)
             new_lines.append(pytree.Node(syms.simple_stmt,
                                          [stmt, end.clone()]))
@@ -91,14 +91,14 @@
         # TODO(cwinter) suite-cleanup
         after = start
         if start == 0:
-            new_lines[0].set_prefix(u" ")
+            new_lines[0].prefix = u" "
         elif is_docstring(suite[0].children[start]):
-            new_lines[0].set_prefix(indent)
+            new_lines[0].prefix = indent
             after = start + 1
 
         suite[0].children[after:after] = new_lines
         for i in range(after+1, after+len(new_lines)+1):
-            suite[0].children[i].set_prefix(indent)
+            suite[0].children[i].prefix = indent
         suite[0].changed()
 
     def transform_lambda(self, node, results):
@@ -109,7 +109,7 @@
         # Replace lambda ((((x)))): x  with lambda x: x
         if inner.type == token.NAME:
             inner = inner.clone()
-            inner.set_prefix(u" ")
+            inner.prefix = u" "
             args.replace(inner)
             return
 
@@ -124,7 +124,7 @@
                 subscripts = [c.clone() for c in to_index[n.value]]
                 new = pytree.Node(syms.power,
                                   [new_param.clone()] + subscripts)
-                new.set_prefix(n.get_prefix())
+                new.prefix = n.prefix
                 n.replace(new)
 
 

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_types.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_types.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_types.py	Sat Jun 20 00:11:15 2009
@@ -58,5 +58,5 @@
     def transform(self, node, results):
         new_value = unicode(_TYPE_MAPPING.get(results["name"].value))
         if new_value:
-            return Name(new_value, prefix=node.get_prefix())
+            return Name(new_value, prefix=node.prefix)
         return None

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_unicode.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_unicode.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_unicode.py	Sat Jun 20 00:11:15 2009
@@ -6,23 +6,20 @@
 from ..pgen2 import token
 from .. import fixer_base
 
+_mapping = {u"unichr" : u"chr", u"unicode" : u"str"}
+_literal_re = re.compile(ur"[uU][rR]?[\'\"]")
+
 class FixUnicode(fixer_base.BaseFix):
 
-    PATTERN = "STRING | NAME<'unicode' | 'unichr'>"
+    PATTERN = "STRING | 'unicode' | 'unichr'"
 
     def transform(self, node, results):
         if node.type == token.NAME:
-            if node.value == u"unicode":
-                new = node.clone()
-                new.value = u"str"
-                return new
-            if node.value == u"unichr":
-                new = node.clone()
-                new.value = u"chr"
-                return new
-            # XXX Warn when __unicode__ found?
+            new = node.clone()
+            new.value = _mapping[node.value]
+            return new
         elif node.type == token.STRING:
-            if re.match(ur"[uU][rR]?[\'\"]", node.value):
+            if _literal_re.match(node.value):
                 new = node.clone()
                 new.value = new.value[1:]
                 return new

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_urllib.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_urllib.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_urllib.py	Sat Jun 20 00:11:15 2009
@@ -78,7 +78,7 @@
            replacements.
         """
         import_mod = results.get('module')
-        pref = import_mod.get_prefix()
+        pref = import_mod.prefix
 
         names = []
 
@@ -94,7 +94,7 @@
            module.
         """
         mod_member = results.get('mod_member')
-        pref = mod_member.get_prefix()
+        pref = mod_member.prefix
         member = results.get('member')
 
         # Simple case with only a single member being imported
@@ -162,7 +162,7 @@
                 break
         if new_name:
             module_dot.replace(Name(new_name,
-                                    prefix=module_dot.get_prefix()))
+                                    prefix=module_dot.prefix))
         else:
             self.cannot_convert(node, 'This is an invalid module element')
 

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_ws_comma.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_ws_comma.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_ws_comma.py	Sat Jun 20 00:11:15 2009
@@ -26,14 +26,14 @@
         comma = False
         for child in new.children:
             if child in self.SEPS:
-                prefix = child.get_prefix()
+                prefix = child.prefix
                 if prefix.isspace() and u"\n" not in prefix:
-                    child.set_prefix(u"")
+                    child.prefix = u""
                 comma = True
             else:
                 if comma:
-                    prefix = child.get_prefix()
+                    prefix = child.prefix
                     if not prefix:
-                        child.set_prefix(u" ")
+                        child.prefix = u" "
                 comma = False
         return new

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_xrange.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_xrange.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_xrange.py	Sat Jun 20 00:11:15 2009
@@ -28,14 +28,14 @@
 
     def transform_xrange(self, node, results):
         name = results["name"]
-        name.replace(Name(u"range", prefix=name.get_prefix()))
+        name.replace(Name(u"range", prefix=name.prefix))
 
     def transform_range(self, node, results):
         if not self.in_special_context(node):
             range_call = Call(Name(u"range"), [results["args"].clone()])
             # Encase the range call in list().
             list_call = Call(Name(u"list"), [range_call],
-                             prefix=node.get_prefix())
+                             prefix=node.prefix)
             # Put things that were after the range() call after the list call.
             for n in results["rest"]:
                 list_call.append_child(n)

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_xreadlines.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_xreadlines.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_xreadlines.py	Sat Jun 20 00:11:15 2009
@@ -19,6 +19,6 @@
         no_call = results.get("no_call")
 
         if no_call:
-            no_call.replace(Name(u"__iter__", prefix=no_call.get_prefix()))
+            no_call.replace(Name(u"__iter__", prefix=no_call.prefix))
         else:
             node.replace([x.clone() for x in results["call"]])

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_zip.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_zip.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/fixes/fix_zip.py	Sat Jun 20 00:11:15 2009
@@ -28,7 +28,7 @@
             return None
 
         new = node.clone()
-        new.set_prefix(u"")
+        new.prefix = u""
         new = Call(Name(u"list"), [new])
-        new.set_prefix(node.get_prefix())
+        new.prefix = node.prefix
         return new

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/patcomp.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/patcomp.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/patcomp.py	Sat Jun 20 00:11:15 2009
@@ -14,10 +14,7 @@
 import os
 
 # Fairly local imports
-from .pgen2 import driver
-from .pgen2 import literals
-from .pgen2 import token
-from .pgen2 import tokenize
+from .pgen2 import driver, literals, token, tokenize, parse
 
 # Really local imports
 from . import pytree
@@ -28,6 +25,10 @@
                                      "PatternGrammar.txt")
 
 
+class PatternSyntaxError(Exception):
+    pass
+
+
 def tokenize_wrapper(input):
     """Tokenizes a string suppressing significant whitespace."""
     skip = set((token.NEWLINE, token.INDENT, token.DEDENT))
@@ -54,7 +55,10 @@
     def compile_pattern(self, input, debug=False):
         """Compiles a pattern string to a nested pytree.*Pattern object."""
         tokens = tokenize_wrapper(input)
-        root = self.driver.parse_tokens(tokens, debug=debug)
+        try:
+            root = self.driver.parse_tokens(tokens, debug=debug)
+        except parse.ParseError as e:
+            raise PatternSyntaxError(str(e))
         return self.compile_node(root)
 
     def compile_node(self, node):
@@ -139,7 +143,9 @@
             value = node.value
             if value.isupper():
                 if value not in TOKEN_MAP:
-                    raise SyntaxError("Invalid token: %r" % value)
+                    raise PatternSyntaxError("Invalid token: %r" % value)
+                if nodes[1:]:
+                    raise PatternSyntaxError("Can't have details for token")
                 return pytree.LeafPattern(TOKEN_MAP[value])
             else:
                 if value == "any":
@@ -147,7 +153,7 @@
                 elif not value.startswith("_"):
                     type = getattr(self.pysyms, value, None)
                     if type is None:
-                        raise SyntaxError("Invalid symbol: %r" % value)
+                        raise PatternSyntaxError("Invalid symbol: %r" % value)
                 if nodes[1:]: # Details present
                     content = [self.compile_node(nodes[1].children[1])]
                 else:

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/pytree.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/pytree.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/pytree.py	Sat Jun 20 00:11:15 2009
@@ -13,6 +13,7 @@
 __author__ = "Guido van Rossum <guido at python.org>"
 
 import sys
+import warnings
 from StringIO import StringIO
 
 
@@ -111,17 +112,21 @@
         """
         Set the prefix for the node (see Leaf class).
 
-        This must be implemented by the concrete subclass.
+        DEPRECATED; use the prefix property directly.
         """
-        raise NotImplementedError
+        warnings.warn("set_prefix() is deprecated; use the prefix property",
+                      DeprecationWarning, stacklevel=2)
+        self.prefix = prefix
 
     def get_prefix(self):
         """
         Return the prefix for the node (see Leaf class).
 
-        This must be implemented by the concrete subclass.
+        DEPRECATED; use the prefix property directly.
         """
-        raise NotImplementedError
+        warnings.warn("get_prefix() is deprecated; use the prefix property",
+                      DeprecationWarning, stacklevel=2)
+        return self.prefix
 
     def replace(self, new):
         """Replace this node with a new one in the parent."""
@@ -209,12 +214,12 @@
     def get_suffix(self):
         """
         Return the string immediately following the invocant node. This is
-        effectively equivalent to node.next_sibling.get_prefix()
+        effectively equivalent to node.next_sibling.prefix
         """
         next_sib = self.next_sibling
         if next_sib is None:
             return u""
-        return next_sib.get_prefix()
+        return next_sib.prefix
 
     if sys.version_info < (3, 0):
         def __str__(self):
@@ -241,7 +246,7 @@
             assert ch.parent is None, repr(ch)
             ch.parent = self
         if prefix is not None:
-            self.set_prefix(prefix)
+            self.prefix = prefix
 
     def __repr__(self):
         """Return a canonical string representation."""
@@ -282,24 +287,19 @@
             for node in child.post_order():
                 yield node
 
-    def set_prefix(self, prefix):
-        """
-        Set the prefix for the node.
-
-        This passes the responsibility on to the first child.
-        """
-        if self.children:
-            self.children[0].set_prefix(prefix)
-
-    def get_prefix(self):
+    @property
+    def prefix(self):
         """
-        Return the prefix for the node.
-
-        This passes the call on to the first child.
+        The whitespace and comments preceding this node in the input.
         """
         if not self.children:
             return ""
-        return self.children[0].get_prefix()
+        return self.children[0].prefix
+
+    @prefix.setter
+    def prefix(self, prefix):
+        if self.children:
+            self.children[0].prefix = prefix
 
     def set_child(self, i, child):
         """
@@ -335,9 +335,9 @@
     """Concrete implementation for leaf nodes."""
 
     # Default values for instance variables
-    prefix = ""  # Whitespace and comments preceding this token in the input
-    lineno = 0   # Line where this token starts in the input
-    column = 0   # Column where this token tarts in the input
+    _prefix = ""  # Whitespace and comments preceding this token in the input
+    lineno = 0    # Line where this token starts in the input
+    column = 0    # Column where this token tarts in the input
 
     def __init__(self, type, value, context=None, prefix=None):
         """
@@ -348,11 +348,11 @@
         """
         assert 0 <= type < 256, type
         if context is not None:
-            self.prefix, (self.lineno, self.column) = context
+            self._prefix, (self.lineno, self.column) = context
         self.type = type
         self.value = value
         if prefix is not None:
-            self.prefix = prefix
+            self._prefix = prefix
 
     def __repr__(self):
         """Return a canonical string representation."""
@@ -388,14 +388,17 @@
         """Return a pre-order iterator for the tree."""
         yield self
 
-    def set_prefix(self, prefix):
-        """Set the prefix for the node."""
-        self.changed()
-        self.prefix = prefix
+    @property
+    def prefix(self):
+        """
+        The whitespace and comments preceding this token in the input.
+        """
+        return self._prefix
 
-    def get_prefix(self):
-        """Return the prefix for the node."""
-        return self.prefix
+    @prefix.setter
+    def prefix(self, prefix):
+        self.changed()
+        self._prefix = prefix
 
 
 def convert(gr, raw_node):

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/refactor.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/refactor.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/refactor.py	Sat Jun 20 00:11:15 2009
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.5
 # Copyright 2006 Google, Inc. All Rights Reserved.
 # Licensed to PSF under a Contributor Agreement.
 
@@ -23,11 +22,7 @@
 
 # Local imports
 from .pgen2 import driver, tokenize
-
-from . import pytree
-from . import patcomp
-from . import fixes
-from . import pygram
+from . import pytree, pygram
 
 
 def get_all_fix_names(fixer_pkg, remove_prefix=True):

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/data/different_encoding.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/data/different_encoding.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/data/different_encoding.py	Sat Jun 20 00:11:15 2009
@@ -1,4 +1,3 @@
 #!/usr/bin/env python
 # -*- coding: iso-8859-1 -*-
-print(u'ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ')
-
+print u'ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ'

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/data/fixers/myfixes/fix_parrot.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/data/fixers/myfixes/fix_parrot.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/data/fixers/myfixes/fix_parrot.py	Sat Jun 20 00:11:15 2009
@@ -10,4 +10,4 @@
 
     def transform(self, node, results):
         name = results["name"]
-        name.replace(Name("cheese", name.get_prefix()))
+        name.replace(Name("cheese", name.prefix))

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/data/py2_test_grammar.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/data/py2_test_grammar.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/data/py2_test_grammar.py	Sat Jun 20 00:11:15 2009
@@ -1,5 +1,3 @@
-# Python 2's Lib/test/test_grammar.py (r66189)
-
 # Python test set -- part 1, grammar.
 # This just tests whether the parser accepts them all.
 
@@ -922,6 +920,26 @@
         self.assertEqual([x for x, in [(4,), (5,), (6,)]], [4, 5, 6])
         self.assertEqual(list(x for x, in [(7,), (8,), (9,)]), [7, 8, 9])
 
+    def test_with_statement(self):
+        class manager(object):
+            def __enter__(self):
+                return (1, 2)
+            def __exit__(self, *args):
+                pass
+
+        with manager():
+            pass
+        with manager() as x:
+            pass
+        with manager() as (x, y):
+            pass
+        with manager(), manager():
+            pass
+        with manager() as x, manager() as y:
+            pass
+        with manager() as x, manager():
+            pass
+
     def testIfElseExpr(self):
         # Test ifelse expressions in various cases
         def _checkeval(msg, ret):

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/data/py3_test_grammar.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/data/py3_test_grammar.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/data/py3_test_grammar.py	Sat Jun 20 00:11:15 2009
@@ -868,6 +868,26 @@
         self.assertEqual([x for x, in [(4,), (5,), (6,)]], [4, 5, 6])
         self.assertEqual(list(x for x, in [(7,), (8,), (9,)]), [7, 8, 9])
 
+    def test_with_statement(self):
+        class manager(object):
+            def __enter__(self):
+                return (1, 2)
+            def __exit__(self, *args):
+                pass
+
+        with manager():
+            pass
+        with manager() as x:
+            pass
+        with manager() as (x, y):
+            pass
+        with manager(), manager():
+            pass
+        with manager() as x, manager() as y:
+            pass
+        with manager() as x, manager():
+            pass
+
     def testIfElseExpr(self):
         # Test ifelse expressions in various cases
         def _checkeval(msg, ret):

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/pytree_idempotency.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/pytree_idempotency.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/pytree_idempotency.py	Sat Jun 20 00:11:15 2009
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.5
+#!/usr/bin/env python
 # Copyright 2006 Google, Inc. All Rights Reserved.
 # Licensed to PSF under a Contributor Agreement.
 

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/support.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/support.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/support.py	Sat Jun 20 00:11:15 2009
@@ -30,7 +30,7 @@
 def reformat(string):
     return dedent(string) + u"\n\n"
 
-def get_refactorer(fixers=None, options=None):
+def get_refactorer(fixer_pkg="lib2to3", fixers=None, options=None):
     """
     A convenience function for creating a RefactoringTool for tests.
 
@@ -39,9 +39,9 @@
     be passed to the RefactoringTool.
     """
     if fixers is not None:
-        fixers = ["lib2to3.fixes.fix_" + fix for fix in fixers]
+        fixers = [fixer_pkg + ".fixes.fix_" + fix for fix in fixers]
     else:
-        fixers = refactor.get_fixers_from_package("lib2to3.fixes")
+        fixers = refactor.get_fixers_from_package(fixer_pkg + ".fixes")
     options = options or {}
     return refactor.RefactoringTool(fixers, options, explicit=True)
 

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_all_fixers.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_all_fixers.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_all_fixers.py	Sat Jun 20 00:11:15 2009
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.5
 """Tests that run all fixer modules over an input stream.
 
 This has been broken out into its own test module because of its
@@ -6,18 +5,13 @@
 """
 # Author: Collin Winter
 
-# Testing imports
-try:
-    from . import support
-except ImportError:
-    import support
-
 # Python imports
 import unittest
 
 # Local imports
 from .. import pytree
 from .. import refactor
+from . import support
 
 class Test_all(support.TestCase):
     def setUp(self):
@@ -28,8 +22,3 @@
         for filepath in support.all_project_files():
             print "Fixing %s..." % filepath
             self.refactor.refactor_file(filepath)
-
-
-if __name__ == "__main__":
-    import __main__
-    support.run_all_tests(__main__)

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_fixers.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_fixers.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_fixers.py	Sat Jun 20 00:11:15 2009
@@ -1,12 +1,4 @@
-#!/usr/bin/env python2.5
 """ Test suite for the fixer modules """
-# Author: Collin Winter
-
-# Testing imports
-try:
-    from tests import support
-except ImportError:
-    import support
 
 # Python imports
 import os
@@ -16,14 +8,19 @@
 
 # Local imports
 from lib2to3 import pygram, pytree, refactor, fixer_util
+from lib2to3.tests import support
 
 
 class FixerTestCase(support.TestCase):
-    def setUp(self, fix_list=None):
+
+    # Other test cases can subclass this class and replace "fixer_pkg" with
+    # their own.
+    def setUp(self, fix_list=None, fixer_pkg="lib2to3", options=None):
         if fix_list is None:
             fix_list = [self.fixer]
-        options = {"print_function" : False}
-        self.refactor = support.get_refactorer(fix_list, options)
+        if options is None:
+            options = {"print_function" : False}
+        self.refactor = support.get_refactorer(fixer_pkg, fix_list, options)
         self.fixer_log = []
         self.filename = u"<string>"
 
@@ -62,7 +59,7 @@
         fixes = [self.fixer]
         fixes.extend(names)
         options = {"print_function" : False}
-        r = support.get_refactorer(fixes, options)
+        r = support.get_refactorer("lib2to3", fixes, options)
         (pre, post) = r.get_fixers()
         n = "fix_" + self.fixer
         if post and post[-1].__class__.__module__.endswith(n):
@@ -419,6 +416,7 @@
     def test_5(self):
         b = """print; print whatever;"""
         a = """print(); print(whatever);"""
+        self.check(b, a)
 
     def test_tuple(self):
         b = """print (a, b, c)"""
@@ -782,6 +780,52 @@
                 pass"""
         self.check(b, a)
 
+    def test_one_line_suites(self):
+        b = """
+            try: raise TypeError
+            except TypeError, e:
+                pass
+            """
+        a = """
+            try: raise TypeError
+            except TypeError as e:
+                pass
+            """
+        self.check(b, a)
+        b = """
+            try:
+                raise TypeError
+            except TypeError, e: pass
+            """
+        a = """
+            try:
+                raise TypeError
+            except TypeError as e: pass
+            """
+        self.check(b, a)
+        b = """
+            try: raise TypeError
+            except TypeError, e: pass
+            """
+        a = """
+            try: raise TypeError
+            except TypeError as e: pass
+            """
+        self.check(b, a)
+        b = """
+            try: raise TypeError
+            except TypeError, e: pass
+            else: function()
+            finally: done()
+            """
+        a = """
+            try: raise TypeError
+            except TypeError as e: pass
+            else: function()
+            finally: done()
+            """
+        self.check(b, a)
+
     # These should not be touched:
 
     def test_unchanged_1(self):
@@ -2640,11 +2684,29 @@
 class Test_unicode(FixerTestCase):
     fixer = "unicode"
 
+    def test_whitespace(self):
+        b = """unicode( x)"""
+        a = """str( x)"""
+        self.check(b, a)
+
+        b = """ unicode(x )"""
+        a = """ str(x )"""
+        self.check(b, a)
+
+        b = """ u'h'"""
+        a = """ 'h'"""
+        self.check(b, a)
+
     def test_unicode_call(self):
         b = """unicode(x, y, z)"""
         a = """str(x, y, z)"""
         self.check(b, a)
 
+    def test_unichr(self):
+        b = """unichr(u'h')"""
+        a = """chr('h')"""
+        self.check(b, a)
+
     def test_unicode_literal_1(self):
         b = '''u"x"'''
         a = '''"x"'''
@@ -2656,8 +2718,8 @@
         self.check(b, a)
 
     def test_unicode_literal_3(self):
-        b = """UR'''x'''"""
-        a = """R'''x'''"""
+        b = """UR'''x''' """
+        a = """R'''x''' """
         self.check(b, a)
 
 class Test_callable(FixerTestCase):
@@ -3306,6 +3368,11 @@
         a = """x = memoryview(y)"""
         self.check(b, a)
 
+    def test_slicing(self):
+        b = """buffer(y)[4:5]"""
+        a = """memoryview(y)[4:5]"""
+        self.check(b, a)
+
 class Test_future(FixerTestCase):
     fixer = "future"
 
@@ -4028,8 +4095,3 @@
         b = """os.getcwdu (  )"""
         a = """os.getcwd (  )"""
         self.check(b, a)
-
-
-if __name__ == "__main__":
-    import __main__
-    support.run_all_tests(__main__)

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_parser.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_parser.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_parser.py	Sat Jun 20 00:11:15 2009
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.5
 """Test suite for 2to3's parser and grammar files.
 
 This is the place to add tests for changes to 2to3's grammar, such as those
@@ -6,7 +5,6 @@
 parts of the grammar we've changed, we also make sure we can parse the
 test_grammar.py files from both Python 2 and Python 3.
 """
-# Author: Collin Winter
 
 # Testing imports
 from . import support
@@ -198,7 +196,7 @@
 
 
 def diff(fn, result):
-    f = open("@", "w")
+    f = open("@", "wb")
     try:
         f.write(result)
     finally:
@@ -207,8 +205,3 @@
         return os.system("diff -u %s @" % fn)
     finally:
         os.remove("@")
-
-
-if __name__ == "__main__":
-    import __main__
-    support.run_all_tests(__main__)

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_pytree.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_pytree.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_pytree.py	Sat Jun 20 00:11:15 2009
@@ -1,4 +1,3 @@
-#!/usr/bin/env python2.5
 # Copyright 2006 Google, Inc. All Rights Reserved.
 # Licensed to PSF under a Contributor Agreement.
 
@@ -10,11 +9,12 @@
 especially when debugging a test.
 """
 
+import warnings
+
 # Testing imports
 from . import support
 
-# Local imports (XXX should become a package)
-from .. import pytree
+from lib2to3 import pytree
 
 try:
     sorted
@@ -28,34 +28,48 @@
 
     """Unit tests for nodes (Base, Leaf, Node)."""
 
-    def testBaseCantConstruct(self):
+    def test_deprecated_prefix_methods(self):
+        l = pytree.Leaf(100, "foo")
+        with warnings.catch_warnings(record=True) as w:
+            self.assertEqual(l.get_prefix(), "")
+            l.set_prefix("hi")
+        self.assertEqual(l.prefix, "hi")
+        self.assertEqual(len(w), 2)
+        for warning in w:
+            self.assertTrue(warning.category is DeprecationWarning)
+        self.assertEqual(str(w[0].message), "get_prefix() is deprecated; " \
+                             "use the prefix property")
+        self.assertEqual(str(w[1].message), "set_prefix() is deprecated; " \
+                             "use the prefix property")
+
+    def test_instantiate_base(self):
         if __debug__:
             # Test that instantiating Base() raises an AssertionError
             self.assertRaises(AssertionError, pytree.Base)
 
-    def testLeaf(self):
+    def test_leaf(self):
         l1 = pytree.Leaf(100, "foo")
         self.assertEqual(l1.type, 100)
         self.assertEqual(l1.value, "foo")
 
-    def testLeafRepr(self):
+    def test_leaf_repr(self):
         l1 = pytree.Leaf(100, "foo")
         self.assertEqual(repr(l1), "Leaf(100, 'foo')")
 
-    def testLeafStr(self):
+    def test_leaf_str(self):
         l1 = pytree.Leaf(100, "foo")
         self.assertEqual(str(l1), "foo")
         l2 = pytree.Leaf(100, "foo", context=(" ", (10, 1)))
         self.assertEqual(str(l2), " foo")
 
-    def testLeafStrNumericValue(self):
+    def test_leaf_str_numeric_value(self):
         # Make sure that the Leaf's value is stringified. Failing to
         #  do this can cause a TypeError in certain situations.
         l1 = pytree.Leaf(2, 5)
-        l1.set_prefix("foo_")
+        l1.prefix = "foo_"
         self.assertEqual(str(l1), "foo_5")
 
-    def testLeafEq(self):
+    def test_leaf_equality(self):
         l1 = pytree.Leaf(100, "foo")
         l2 = pytree.Leaf(100, "foo", context=(" ", (1, 0)))
         self.assertEqual(l1, l2)
@@ -64,67 +78,67 @@
         self.assertNotEqual(l1, l3)
         self.assertNotEqual(l1, l4)
 
-    def testLeafPrefix(self):
+    def test_leaf_prefix(self):
         l1 = pytree.Leaf(100, "foo")
-        self.assertEqual(l1.get_prefix(), "")
+        self.assertEqual(l1.prefix, "")
         self.failIf(l1.was_changed)
-        l1.set_prefix("  ##\n\n")
-        self.assertEqual(l1.get_prefix(), "  ##\n\n")
+        l1.prefix = "  ##\n\n"
+        self.assertEqual(l1.prefix, "  ##\n\n")
         self.failUnless(l1.was_changed)
 
-    def testNode(self):
+    def test_node(self):
         l1 = pytree.Leaf(100, "foo")
         l2 = pytree.Leaf(200, "bar")
         n1 = pytree.Node(1000, [l1, l2])
         self.assertEqual(n1.type, 1000)
         self.assertEqual(n1.children, [l1, l2])
 
-    def testNodeRepr(self):
+    def test_node_repr(self):
         l1 = pytree.Leaf(100, "foo")
         l2 = pytree.Leaf(100, "bar", context=(" ", (1, 0)))
         n1 = pytree.Node(1000, [l1, l2])
         self.assertEqual(repr(n1),
                          "Node(1000, [%s, %s])" % (repr(l1), repr(l2)))
 
-    def testNodeStr(self):
+    def test_node_str(self):
         l1 = pytree.Leaf(100, "foo")
         l2 = pytree.Leaf(100, "bar", context=(" ", (1, 0)))
         n1 = pytree.Node(1000, [l1, l2])
         self.assertEqual(str(n1), "foo bar")
 
-    def testNodePrefix(self):
+    def test_node_prefix(self):
         l1 = pytree.Leaf(100, "foo")
-        self.assertEqual(l1.get_prefix(), "")
+        self.assertEqual(l1.prefix, "")
         n1 = pytree.Node(1000, [l1])
-        self.assertEqual(n1.get_prefix(), "")
-        n1.set_prefix(" ")
-        self.assertEqual(n1.get_prefix(), " ")
-        self.assertEqual(l1.get_prefix(), " ")
+        self.assertEqual(n1.prefix, "")
+        n1.prefix = " "
+        self.assertEqual(n1.prefix, " ")
+        self.assertEqual(l1.prefix, " ")
 
-    def testGetSuffix(self):
+    def test_get_suffix(self):
         l1 = pytree.Leaf(100, "foo", prefix="a")
         l2 = pytree.Leaf(100, "bar", prefix="b")
         n1 = pytree.Node(1000, [l1, l2])
 
-        self.assertEqual(l1.get_suffix(), l2.get_prefix())
+        self.assertEqual(l1.get_suffix(), l2.prefix)
         self.assertEqual(l2.get_suffix(), "")
         self.assertEqual(n1.get_suffix(), "")
 
         l3 = pytree.Leaf(100, "bar", prefix="c")
         n2 = pytree.Node(1000, [n1, l3])
 
-        self.assertEqual(n1.get_suffix(), l3.get_prefix())
+        self.assertEqual(n1.get_suffix(), l3.prefix)
         self.assertEqual(l3.get_suffix(), "")
         self.assertEqual(n2.get_suffix(), "")
 
-    def testNodeEq(self):
+    def test_node_equality(self):
         n1 = pytree.Node(1000, ())
         n2 = pytree.Node(1000, [], context=(" ", (1, 0)))
         self.assertEqual(n1, n2)
         n3 = pytree.Node(1001, ())
         self.assertNotEqual(n1, n3)
 
-    def testNodeEqRecursive(self):
+    def test_node_recursive_equality(self):
         l1 = pytree.Leaf(100, "foo")
         l2 = pytree.Leaf(100, "foo")
         n1 = pytree.Node(1000, [l1])
@@ -134,7 +148,7 @@
         n3 = pytree.Node(1000, [l3])
         self.assertNotEqual(n1, n3)
 
-    def testReplace(self):
+    def test_replace(self):
         l1 = pytree.Leaf(100, "foo")
         l2 = pytree.Leaf(100, "+")
         l3 = pytree.Leaf(100, "bar")
@@ -148,7 +162,7 @@
         self.failUnless(isinstance(n1.children, list))
         self.failUnless(n1.was_changed)
 
-    def testReplaceWithList(self):
+    def test_replace_with_list(self):
         l1 = pytree.Leaf(100, "foo")
         l2 = pytree.Leaf(100, "+")
         l3 = pytree.Leaf(100, "bar")
@@ -158,34 +172,30 @@
         self.assertEqual(str(n1), "foo**bar")
         self.failUnless(isinstance(n1.children, list))
 
-    def testPostOrder(self):
+    def test_post_order(self):
         l1 = pytree.Leaf(100, "foo")
         l2 = pytree.Leaf(100, "bar")
         n1 = pytree.Node(1000, [l1, l2])
         self.assertEqual(list(n1.post_order()), [l1, l2, n1])
 
-    def testPreOrder(self):
+    def test_pre_order(self):
         l1 = pytree.Leaf(100, "foo")
         l2 = pytree.Leaf(100, "bar")
         n1 = pytree.Node(1000, [l1, l2])
         self.assertEqual(list(n1.pre_order()), [n1, l1, l2])
 
-    def testChangedLeaf(self):
+    def test_changed(self):
         l1 = pytree.Leaf(100, "f")
         self.failIf(l1.was_changed)
-
         l1.changed()
         self.failUnless(l1.was_changed)
 
-    def testChangedNode(self):
         l1 = pytree.Leaf(100, "f")
         n1 = pytree.Node(1000, [l1])
         self.failIf(n1.was_changed)
-
         n1.changed()
         self.failUnless(n1.was_changed)
 
-    def testChangedRecursive(self):
         l1 = pytree.Leaf(100, "foo")
         l2 = pytree.Leaf(100, "+")
         l3 = pytree.Leaf(100, "bar")
@@ -200,23 +210,23 @@
         self.failUnless(n2.was_changed)
         self.failIf(l1.was_changed)
 
-    def testLeafConstructorPrefix(self):
+    def test_leaf_constructor_prefix(self):
         for prefix in ("xyz_", ""):
             l1 = pytree.Leaf(100, "self", prefix=prefix)
             self.failUnless(str(l1), prefix + "self")
-            self.assertEqual(l1.get_prefix(), prefix)
+            self.assertEqual(l1.prefix, prefix)
 
-    def testNodeConstructorPrefix(self):
+    def test_node_constructor_prefix(self):
         for prefix in ("xyz_", ""):
             l1 = pytree.Leaf(100, "self")
             l2 = pytree.Leaf(100, "foo", prefix="_")
             n1 = pytree.Node(1000, [l1, l2], prefix=prefix)
             self.failUnless(str(n1), prefix + "self_foo")
-            self.assertEqual(n1.get_prefix(), prefix)
-            self.assertEqual(l1.get_prefix(), prefix)
-            self.assertEqual(l2.get_prefix(), "_")
+            self.assertEqual(n1.prefix, prefix)
+            self.assertEqual(l1.prefix, prefix)
+            self.assertEqual(l2.prefix, "_")
 
-    def testRemove(self):
+    def test_remove(self):
         l1 = pytree.Leaf(100, "foo")
         l2 = pytree.Leaf(100, "foo")
         n1 = pytree.Node(1000, [l1, l2])
@@ -239,7 +249,7 @@
         self.failUnless(n1.was_changed)
         self.failUnless(n2.was_changed)
 
-    def testRemoveParentless(self):
+    def test_remove_parentless(self):
         n1 = pytree.Node(1000, [])
         n1.remove()
         self.assertEqual(n1.parent, None)
@@ -248,7 +258,7 @@
         l1.remove()
         self.assertEqual(l1.parent, None)
 
-    def testNodeSetChild(self):
+    def test_node_set_child(self):
         l1 = pytree.Leaf(100, "foo")
         n1 = pytree.Node(1000, [l1])
 
@@ -269,7 +279,7 @@
         # I don't care what it raises, so long as it's an exception
         self.assertRaises(Exception, n1.set_child, 0, list)
 
-    def testNodeInsertChild(self):
+    def test_node_insert_child(self):
         l1 = pytree.Leaf(100, "foo")
         n1 = pytree.Node(1000, [l1])
 
@@ -285,7 +295,7 @@
         # I don't care what it raises, so long as it's an exception
         self.assertRaises(Exception, n1.insert_child, 0, list)
 
-    def testNodeAppendChild(self):
+    def test_node_append_child(self):
         n1 = pytree.Node(1000, [])
 
         l1 = pytree.Leaf(100, "foo")
@@ -301,7 +311,7 @@
         # I don't care what it raises, so long as it's an exception
         self.assertRaises(Exception, n1.append_child, list)
 
-    def testNodeNextSibling(self):
+    def test_node_next_sibling(self):
         n1 = pytree.Node(1000, [])
         n2 = pytree.Node(1000, [])
         p1 = pytree.Node(1000, [n1, n2])
@@ -310,7 +320,7 @@
         self.assertEqual(n2.next_sibling, None)
         self.assertEqual(p1.next_sibling, None)
 
-    def testLeafNextSibling(self):
+    def test_leaf_next_sibling(self):
         l1 = pytree.Leaf(100, "a")
         l2 = pytree.Leaf(100, "b")
         p1 = pytree.Node(1000, [l1, l2])
@@ -319,7 +329,7 @@
         self.assertEqual(l2.next_sibling, None)
         self.assertEqual(p1.next_sibling, None)
 
-    def testNodePrevSibling(self):
+    def test_node_prev_sibling(self):
         n1 = pytree.Node(1000, [])
         n2 = pytree.Node(1000, [])
         p1 = pytree.Node(1000, [n1, n2])
@@ -328,7 +338,7 @@
         self.assertEqual(n1.prev_sibling, None)
         self.assertEqual(p1.prev_sibling, None)
 
-    def testLeafPrevSibling(self):
+    def test_leaf_prev_sibling(self):
         l1 = pytree.Leaf(100, "a")
         l2 = pytree.Leaf(100, "b")
         p1 = pytree.Node(1000, [l1, l2])
@@ -342,7 +352,7 @@
 
     """Unit tests for tree matching patterns."""
 
-    def testBasicPatterns(self):
+    def test_basic_patterns(self):
         # Build a tree
         l1 = pytree.Leaf(100, "foo")
         l2 = pytree.Leaf(100, "bar")
@@ -378,7 +388,7 @@
         self.assertFalse(pn.match(l2, results=r))
         self.assertEqual(r, {})
 
-    def testWildcardPatterns(self):
+    def test_wildcard(self):
         # Build a tree for testing
         l1 = pytree.Leaf(100, "foo")
         l2 = pytree.Leaf(100, "bar")
@@ -409,7 +419,7 @@
         self.assert_(r["pl"] is l3)
         r = {}
 
-    def testGenerateMatches(self):
+    def test_generate_matches(self):
         la = pytree.Leaf(1, "a")
         lb = pytree.Leaf(1, "b")
         lc = pytree.Leaf(1, "c")
@@ -439,7 +449,7 @@
         for c in "abcdef":
             self.assertEqual(r["p" + c], pytree.Leaf(1, c))
 
-    def testHasKeyExample(self):
+    def test_has_key_example(self):
         pattern = pytree.NodePattern(331,
                                      (pytree.LeafPattern(7),
                                       pytree.WildcardPattern(name="args"),
@@ -451,8 +461,3 @@
         r = {}
         self.assert_(pattern.match(node, r))
         self.assertEqual(r["args"], [l2])
-
-
-if __name__ == "__main__":
-    import __main__
-    support.run_all_tests(__main__)

Modified: python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_util.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_util.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib2to3/tests/test_util.py	Sat Jun 20 00:11:15 2009
@@ -1,6 +1,4 @@
-#!/usr/bin/env python2.5
 """ Test suite for the code in fixes.util """
-# Author: Collin Winter
 
 # Testing imports
 from . import support
@@ -552,8 +550,3 @@
         node = parse('bar()')
         fixer_util.touch_import(None, "cgi", node)
         self.assertEqual(str(node), 'import cgi\nbar()\n\n')
-
-
-if __name__ == "__main__":
-    import __main__
-    support.run_all_tests(__main__)

Modified: python/branches/tk_and_idle_maintenance/Lib/logging/handlers.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/logging/handlers.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/logging/handlers.py	Sat Jun 20 00:11:15 2009
@@ -172,7 +172,6 @@
         #
         # Case of the 'when' specifier is not important; lower or upper case
         # will work.
-        currentTime = int(time.time())
         if self.when == 'S':
             self.interval = 1 # one second
             self.suffix = "%Y-%m-%d_%H-%M-%S"
@@ -203,8 +202,15 @@
 
         self.extMatch = re.compile(self.extMatch)
         self.interval = self.interval * interval # multiply by units requested
-        self.rolloverAt = currentTime + self.interval
+        self.rolloverAt = self.computeRollover(int(time.time()))
+
+        #print "Will rollover at %d, %d seconds from now" % (self.rolloverAt, self.rolloverAt - currentTime)
 
+    def computeRollover(self, currentTime):
+        """
+        Work out the rollover time based on the specified time.
+        """
+        result = currentTime + self.interval
         # If we are rolling over at midnight or weekly, then the interval is already known.
         # What we need to figure out is WHEN the next interval is.  In other words,
         # if you are rolling over at midnight, then your base interval is 1 day,
@@ -214,7 +220,7 @@
         # the rest.  Note that this code doesn't care about leap seconds. :)
         if self.when == 'MIDNIGHT' or self.when.startswith('W'):
             # This could be done with less code, but I wanted it to be clear
-            if utc:
+            if self.utc:
                 t = time.gmtime(currentTime)
             else:
                 t = time.localtime(currentTime)
@@ -224,7 +230,7 @@
             # r is the number of seconds left between now and midnight
             r = _MIDNIGHT - ((currentHour * 60 + currentMinute) * 60 +
                     currentSecond)
-            self.rolloverAt = currentTime + r
+            result = currentTime + r
             # If we are rolling over on a certain day, add in the number of days until
             # the next rollover, but offset by 1 since we just calculated the time
             # until the next day starts.  There are three cases:
@@ -240,15 +246,15 @@
             # The calculations described in 2) and 3) above need to have a day added.
             # This is because the above time calculation takes us to midnight on this
             # day, i.e. the start of the next day.
-            if when.startswith('W'):
+            if self.when.startswith('W'):
                 day = t[6] # 0 is Monday
                 if day != self.dayOfWeek:
                     if day < self.dayOfWeek:
                         daysToWait = self.dayOfWeek - day
                     else:
                         daysToWait = 6 - day + self.dayOfWeek + 1
-                    newRolloverAt = self.rolloverAt + (daysToWait * (60 * 60 * 24))
-                    if not utc:
+                    newRolloverAt = result + (daysToWait * (60 * 60 * 24))
+                    if not self.utc:
                         dstNow = t[-1]
                         dstAtRollover = time.localtime(newRolloverAt)[-1]
                         if dstNow != dstAtRollover:
@@ -256,9 +262,8 @@
                                 newRolloverAt = newRolloverAt - 3600
                             else:           # DST bows out before next rollover, so we need to add an hour
                                 newRolloverAt = newRolloverAt + 3600
-                    self.rolloverAt = newRolloverAt
-
-        #print "Will rollover at %d, %d seconds from now" % (self.rolloverAt, self.rolloverAt - currentTime)
+                    result = newRolloverAt
+        return result
 
     def shouldRollover(self, record):
         """
@@ -327,8 +332,8 @@
         #print "%s -> %s" % (self.baseFilename, dfn)
         self.mode = 'w'
         self.stream = self._open()
-        newRolloverAt = self.rolloverAt + self.interval
         currentTime = int(time.time())
+        newRolloverAt = self.computeRollover(currentTime)
         while newRolloverAt <= currentTime:
             newRolloverAt = newRolloverAt + self.interval
         #If DST changes and midnight or weekly rollover, adjust for this.

Modified: python/branches/tk_and_idle_maintenance/Lib/msilib/__init__.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/msilib/__init__.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/msilib/__init__.py	Sat Jun 20 00:11:15 2009
@@ -2,9 +2,11 @@
 # Copyright (C) 2005 Martin v. Löwis
 # Licensed to PSF under a Contributor Agreement.
 from _msi import *
-import os, string, re
+import os, string, re, sys
 
-Win64=0
+AMD64 = "AMD64" in sys.version
+Itanium = "Itanium" in sys.version
+Win64 = AMD64 or Itanium
 
 # Partially taken from Wine
 datasizemask=      0x00ff
@@ -145,8 +147,10 @@
     si.SetProperty(PID_TITLE, "Installation Database")
     si.SetProperty(PID_SUBJECT, ProductName)
     si.SetProperty(PID_AUTHOR, Manufacturer)
-    if Win64:
+    if Itanium:
         si.SetProperty(PID_TEMPLATE, "Intel64;1033")
+    elif AMD64:
+        si.SetProperty(PID_TEMPLATE, "x64;1033")
     else:
         si.SetProperty(PID_TEMPLATE, "Intel;1033")
     si.SetProperty(PID_REVNUMBER, gen_uuid())

Modified: python/branches/tk_and_idle_maintenance/Lib/multiprocessing/queues.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/multiprocessing/queues.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/multiprocessing/queues.py	Sat Jun 20 00:11:15 2009
@@ -109,7 +109,7 @@
                 self._rlock.release()
 
     def qsize(self):
-        # Raises NotImplementError on Mac OSX because of broken sem_getvalue()
+        # Raises NotImplementedError on Mac OSX because of broken sem_getvalue()
         return self._maxsize - self._sem._semlock._get_value()
 
     def empty(self):

Modified: python/branches/tk_and_idle_maintenance/Lib/os.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/os.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/os.py	Sat Jun 20 00:11:15 2009
@@ -514,11 +514,7 @@
 __all__.append("getenv")
 
 def _exists(name):
-    try:
-        eval(name)
-        return True
-    except NameError:
-        return False
+    return name in globals()
 
 # Supply spawn*() (probably only for Unix)
 if _exists("fork") and not _exists("spawnv") and _exists("execv"):

Modified: python/branches/tk_and_idle_maintenance/Lib/random.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/random.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/random.py	Sat Jun 20 00:11:15 2009
@@ -349,7 +349,7 @@
 ## -------------------- uniform distribution -------------------
 
     def uniform(self, a, b):
-        """Get a random number in the range [a, b)."""
+        "Get a random number in the range [a, b) or [a, b] depending on rounding."
         return a + (b-a) * self.random()
 
 ## -------------------- triangular --------------------

Modified: python/branches/tk_and_idle_maintenance/Lib/subprocess.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/subprocess.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/subprocess.py	Sat Jun 20 00:11:15 2009
@@ -500,7 +500,7 @@
     """
     if 'stdout' in kwargs:
         raise ValueError('stdout argument not allowed, it will be overridden.')
-    process = Popen(*popenargs, stdout=PIPE, **kwargs)
+    process = Popen(stdout=PIPE, *popenargs, **kwargs)
     output, unused_err = process.communicate()
     retcode = process.poll()
     if retcode:
@@ -1020,8 +1020,17 @@
 
 
         def _close_fds(self, but):
-            os.closerange(3, but)
-            os.closerange(but + 1, MAXFD)
+            if hasattr(os, 'closerange'):
+                os.closerange(3, but)
+                os.closerange(but + 1, MAXFD)
+            else:
+                for i in xrange(3, MAXFD):
+                    if i == but:
+                        continue
+                    try:
+                        os.close(i)
+                    except:
+                        pass
 
 
         def _execute_child(self, args, executable, preexec_fn, close_fds,
@@ -1047,90 +1056,98 @@
             # The first char specifies the exception type: 0 means
             # OSError, 1 means some other error.
             errpipe_read, errpipe_write = os.pipe()
-            self._set_cloexec_flag(errpipe_write)
-
-            gc_was_enabled = gc.isenabled()
-            # Disable gc to avoid bug where gc -> file_dealloc ->
-            # write to stderr -> hang.  http://bugs.python.org/issue1336
-            gc.disable()
             try:
-                self.pid = os.fork()
-            except:
-                if gc_was_enabled:
-                    gc.enable()
-                raise
-            self._child_created = True
-            if self.pid == 0:
-                # Child
                 try:
-                    # Close parent's pipe ends
-                    if p2cwrite is not None:
-                        os.close(p2cwrite)
-                    if c2pread is not None:
-                        os.close(c2pread)
-                    if errread is not None:
-                        os.close(errread)
-                    os.close(errpipe_read)
-
-                    # Dup fds for child
-                    if p2cread is not None:
-                        os.dup2(p2cread, 0)
-                    if c2pwrite is not None:
-                        os.dup2(c2pwrite, 1)
-                    if errwrite is not None:
-                        os.dup2(errwrite, 2)
-
-                    # Close pipe fds.  Make sure we don't close the same
-                    # fd more than once, or standard fds.
-                    if p2cread is not None and p2cread not in (0,):
-                        os.close(p2cread)
-                    if c2pwrite is not None and c2pwrite not in (p2cread, 1):
-                        os.close(c2pwrite)
-                    if errwrite is not None and errwrite not in (p2cread, c2pwrite, 2):
-                        os.close(errwrite)
-
-                    # Close all other fds, if asked for
-                    if close_fds:
-                        self._close_fds(but=errpipe_write)
-
-                    if cwd is not None:
-                        os.chdir(cwd)
-
-                    if preexec_fn:
-                        preexec_fn()
-
-                    if env is None:
-                        os.execvp(executable, args)
-                    else:
-                        os.execvpe(executable, args, env)
-
-                except:
-                    exc_type, exc_value, tb = sys.exc_info()
-                    # Save the traceback and attach it to the exception object
-                    exc_lines = traceback.format_exception(exc_type,
-                                                           exc_value,
-                                                           tb)
-                    exc_value.child_traceback = ''.join(exc_lines)
-                    os.write(errpipe_write, pickle.dumps(exc_value))
-
-                # This exitcode won't be reported to applications, so it
-                # really doesn't matter what we return.
-                os._exit(255)
-
-            # Parent
-            if gc_was_enabled:
-                gc.enable()
-            os.close(errpipe_write)
-            if p2cread is not None and p2cwrite is not None:
-                os.close(p2cread)
-            if c2pwrite is not None and c2pread is not None:
-                os.close(c2pwrite)
-            if errwrite is not None and errread is not None:
-                os.close(errwrite)
-
-            # Wait for exec to fail or succeed; possibly raising exception
-            data = os.read(errpipe_read, 1048576) # Exceptions limited to 1 MB
-            os.close(errpipe_read)
+                    self._set_cloexec_flag(errpipe_write)
+
+                    gc_was_enabled = gc.isenabled()
+                    # Disable gc to avoid bug where gc -> file_dealloc ->
+                    # write to stderr -> hang.  http://bugs.python.org/issue1336
+                    gc.disable()
+                    try:
+                        self.pid = os.fork()
+                    except:
+                        if gc_was_enabled:
+                            gc.enable()
+                        raise
+                    self._child_created = True
+                    if self.pid == 0:
+                        # Child
+                        try:
+                            # Close parent's pipe ends
+                            if p2cwrite is not None:
+                                os.close(p2cwrite)
+                            if c2pread is not None:
+                                os.close(c2pread)
+                            if errread is not None:
+                                os.close(errread)
+                            os.close(errpipe_read)
+
+                            # Dup fds for child
+                            if p2cread is not None:
+                                os.dup2(p2cread, 0)
+                            if c2pwrite is not None:
+                                os.dup2(c2pwrite, 1)
+                            if errwrite is not None:
+                                os.dup2(errwrite, 2)
+
+                            # Close pipe fds.  Make sure we don't close the same
+                            # fd more than once, or standard fds.
+                            if p2cread is not None and p2cread not in (0,):
+                                os.close(p2cread)
+                            if c2pwrite is not None and c2pwrite not in (p2cread, 1):
+                                os.close(c2pwrite)
+                            if errwrite is not None and errwrite not in (p2cread, c2pwrite, 2):
+                                os.close(errwrite)
+
+                            # Close all other fds, if asked for
+                            if close_fds:
+                                self._close_fds(but=errpipe_write)
+
+                            if cwd is not None:
+                                os.chdir(cwd)
+
+                            if preexec_fn:
+                                preexec_fn()
+
+                            if env is None:
+                                os.execvp(executable, args)
+                            else:
+                                os.execvpe(executable, args, env)
+
+                        except:
+                            exc_type, exc_value, tb = sys.exc_info()
+                            # Save the traceback and attach it to the exception object
+                            exc_lines = traceback.format_exception(exc_type,
+                                                                   exc_value,
+                                                                   tb)
+                            exc_value.child_traceback = ''.join(exc_lines)
+                            os.write(errpipe_write, pickle.dumps(exc_value))
+
+                        # This exitcode won't be reported to applications, so it
+                        # really doesn't matter what we return.
+                        os._exit(255)
+
+                    # Parent
+                    if gc_was_enabled:
+                        gc.enable()
+                finally:
+                    # be sure the FD is closed no matter what
+                    os.close(errpipe_write)
+
+                if p2cread is not None and p2cwrite is not None:
+                    os.close(p2cread)
+                if c2pwrite is not None and c2pread is not None:
+                    os.close(c2pwrite)
+                if errwrite is not None and errread is not None:
+                    os.close(errwrite)
+
+                # Wait for exec to fail or succeed; possibly raising exception
+                data = os.read(errpipe_read, 1048576) # Exception limited to 1M
+            finally:
+                # be sure the FD is closed no matter what
+                os.close(errpipe_read)
+
             if data != "":
                 os.waitpid(self.pid, 0)
                 child_exception = pickle.loads(data)

Modified: python/branches/tk_and_idle_maintenance/Lib/symbol.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/symbol.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/symbol.py	Sat Jun 20 00:11:15 2009
@@ -52,7 +52,7 @@
 for_stmt = 295
 try_stmt = 296
 with_stmt = 297
-with_var = 298
+with_item = 298
 except_clause = 299
 suite = 300
 testlist_safe = 301

Modified: python/branches/tk_and_idle_maintenance/Lib/test/cmath_testcases.txt
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/cmath_testcases.txt	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/cmath_testcases.txt	Sat Jun 20 00:11:15 2009
@@ -43,6 +43,16 @@
 -- ignored.  Blank lines, or lines containing only whitespace, are also
 -- ignored.
 
+-- The majority of the values below were computed with the help of
+-- version 2.3 of the MPFR library for multiple-precision
+-- floating-point computations with correct rounding.  All output
+-- values in this file are (modulo yet-to-be-discovered bugs)
+-- correctly rounded, provided that each input and output decimal
+-- floating-point value below is interpreted as a representation of
+-- the corresponding nearest IEEE 754 double-precision value.  See the
+-- MPFR homepage at http://www.mpfr.org for more information about the
+-- MPFR project.
+
 
 --------------------------
 -- acos: Inverse cosine --

Modified: python/branches/tk_and_idle_maintenance/Lib/test/doctest_aliases.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/doctest_aliases.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/doctest_aliases.py	Sat Jun 20 00:11:15 2009
@@ -10,4 +10,4 @@
         '''
         return 'f'
 
-        g = f # define an alias for f
+    g = f # define an alias for f

Modified: python/branches/tk_and_idle_maintenance/Lib/test/formatfloat_testcases.txt
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/formatfloat_testcases.txt	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/formatfloat_testcases.txt	Sat Jun 20 00:11:15 2009
@@ -61,7 +61,7 @@
 -- makes a difference when the precision is 0.
 %#.0f 0 -> 0.
 %#.1f 0 -> 0.0
---%#.0f 1.5 -> 2.   See issue 6198.
+%#.0f 1.5 -> 2.
 -- %#.0f 2.5 -> 2.    See issue 6198.
 %#.0f 10.1 -> 10.
 %#.0f 1234.56 -> 1235.

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_ast.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_ast.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_ast.py	Sat Jun 20 00:11:15 2009
@@ -146,6 +146,16 @@
                 self.assertEquals(to_tuple(ast_tree), o)
                 self._assert_order(ast_tree, (0, 0))
 
+    def test_slice(self):
+        slc = ast.parse("x[::]").body[0].value.slice
+        self.assertIsNone(slc.upper)
+        self.assertIsNone(slc.lower)
+        self.assertIsNone(slc.step)
+
+    def test_from_import(self):
+        im = ast.parse("from . import y").body[0]
+        self.assertIsNone(im.module)
+
     def test_nodeclasses(self):
         x = ast.BinOp(1, 2, 3, lineno=0)
         self.assertEquals(x.left, 1)

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_bufio.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_bufio.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_bufio.py	Sat Jun 20 00:11:15 2009
@@ -1,12 +1,15 @@
 import unittest
-from test import test_support
+from test import test_support as support
 
-# Simple test to ensure that optimizations in fileobject.c deliver
-# the expected results.  For best testing, run this under a debug-build
-# Python too (to exercise asserts in the C code).
+import io # C implementation.
+import _pyio as pyio # Python implementation.
 
-lengths = range(1, 257) + [512, 1000, 1024, 2048, 4096, 8192, 10000,
-                           16384, 32768, 65536, 1000000]
+# Simple test to ensure that optimizations in the IO library deliver the
+# expected results.  For best testing, run this under a debug-build Python too
+# (to exercise asserts in the C code).
+
+lengths = list(range(1, 257)) + [512, 1000, 1024, 2048, 4096, 8192, 10000,
+                                 16384, 32768, 65536, 1000000]
 
 class BufferSizeTest(unittest.TestCase):
     def try_one(self, s):
@@ -14,27 +17,27 @@
         # .readline()s deliver what we wrote.
 
         # Ensure we can open TESTFN for writing.
-        test_support.unlink(test_support.TESTFN)
+        support.unlink(support.TESTFN)
 
         # Since C doesn't guarantee we can write/read arbitrary bytes in text
         # files, use binary mode.
-        f = open(test_support.TESTFN, "wb")
+        f = self.open(support.TESTFN, "wb")
         try:
             # write once with \n and once without
             f.write(s)
-            f.write("\n")
+            f.write(b"\n")
             f.write(s)
             f.close()
-            f = open(test_support.TESTFN, "rb")
+            f = open(support.TESTFN, "rb")
             line = f.readline()
-            self.assertEqual(line, s + "\n")
+            self.assertEqual(line, s + b"\n")
             line = f.readline()
             self.assertEqual(line, s)
             line = f.readline()
             self.assert_(not line) # Must be at EOF
             f.close()
         finally:
-            test_support.unlink(test_support.TESTFN)
+            support.unlink(support.TESTFN)
 
     def drive_one(self, pattern):
         for length in lengths:
@@ -47,19 +50,30 @@
             teststring = pattern * q + pattern[:r]
             self.assertEqual(len(teststring), length)
             self.try_one(teststring)
-            self.try_one(teststring + "x")
+            self.try_one(teststring + b"x")
             self.try_one(teststring[:-1])
 
     def test_primepat(self):
         # A pattern with prime length, to avoid simple relationships with
         # stdio buffer sizes.
-        self.drive_one("1234567890\00\01\02\03\04\05\06")
+        self.drive_one(b"1234567890\00\01\02\03\04\05\06")
 
     def test_nullpat(self):
-        self.drive_one("\0" * 1000)
+        self.drive_one(bytes(1000))
+
+
+class CBufferSizeTest(BufferSizeTest):
+    open = io.open
+
+class PyBufferSizeTest(BufferSizeTest):
+    open = staticmethod(pyio.open)
+
+class BuiltinBufferSizeTest(BufferSizeTest):
+    open = open
+
 
 def test_main():
-    test_support.run_unittest(BufferSizeTest)
+    support.run_unittest(CBufferSizeTest, PyBufferSizeTest, BuiltinBufferSizeTest)
 
 if __name__ == "__main__":
     test_main()

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_coding.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_coding.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_coding.py	Sat Jun 20 00:11:15 2009
@@ -21,6 +21,18 @@
         fp.close()
         self.assertRaises(SyntaxError, compile, text, filename, 'exec')
 
+    def test_error_from_string(self):
+        # See http://bugs.python.org/issue6289
+        input = u"# coding: ascii\n\N{SNOWMAN}".encode('utf-8')
+        try:
+            compile(input, "<string>", "exec")
+        except SyntaxError as e:
+            expected = "'ascii' codec can't decode byte 0xe2 in position 16: " \
+                "ordinal not in range(128)"
+            self.assertTrue(str(e).startswith(expected))
+        else:
+            self.fail("didn't raise")
+
 def test_main():
     test.test_support.run_unittest(CodingTest)
 

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_compile.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_compile.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_compile.py	Sat Jun 20 00:11:15 2009
@@ -270,11 +270,19 @@
             '(a, None) = 0, 0',
             'for None in range(10): pass',
             'def f(None): pass',
+            'import None',
+            'import x as None',
+            'from x import None',
+            'from x import y as None'
         ]
         for stmt in stmts:
             stmt += "\n"
             self.assertRaises(SyntaxError, compile, stmt, 'tmp', 'single')
             self.assertRaises(SyntaxError, compile, stmt, 'tmp', 'exec')
+        # This is ok.
+        compile("from None import x", "tmp", "exec")
+        compile("from x import None as y", "tmp", "exec")
+        compile("import None as x", "tmp", "exec")
 
     def test_import(self):
         succeed = [

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_curses.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_curses.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_curses.py	Sat Jun 20 00:11:15 2009
@@ -15,6 +15,7 @@
 # 'curses' resource be given on the regrtest command line using the -u
 # option.  If not available, nothing after this line will be executed.
 
+import unittest
 from test.test_support import requires, import_module
 requires('curses')
 curses = import_module('curses')

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_doctest.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_doctest.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_doctest.py	Sat Jun 20 00:11:15 2009
@@ -498,6 +498,8 @@
 will only be generated for it once:
 
     >>> from test import doctest_aliases
+    >>> assert doctest_aliases.TwoNames.f
+    >>> assert doctest_aliases.TwoNames.g
     >>> tests = excl_empty_finder.find(doctest_aliases)
     >>> print len(tests)
     2

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_file.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_file.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_file.py	Sat Jun 20 00:11:15 2009
@@ -1,13 +1,17 @@
+# NOTE: this file tests the new `io` library backported from Python 3.x.
+# Similar tests for the builtin file object can be found in test_file2k.py.
+
+from __future__ import print_function
+
 import sys
 import os
 import unittest
-import itertools
-import time
-import threading
 from array import array
 from weakref import proxy
 
-from test import test_support
+import io
+import _pyio as pyio
+
 from test.test_support import TESTFN, findfile, run_unittest
 from UserList import UserList
 
@@ -15,7 +19,7 @@
     # file tests for which a test file is automatically set up
 
     def setUp(self):
-        self.f = open(TESTFN, 'wb')
+        self.f = self.open(TESTFN, 'wb')
 
     def tearDown(self):
         if self.f:
@@ -25,7 +29,7 @@
     def testWeakRefs(self):
         # verify weak references
         p = proxy(self.f)
-        p.write('teststring')
+        p.write(b'teststring')
         self.assertEquals(self.f.tell(), p.tell())
         self.f.close()
         self.f = None
@@ -34,35 +38,35 @@
     def testAttributes(self):
         # verify expected attributes exist
         f = self.f
-        softspace = f.softspace
         f.name     # merely shouldn't blow up
         f.mode     # ditto
         f.closed   # ditto
 
-        # verify softspace is writable
-        f.softspace = softspace    # merely shouldn't blow up
-
-        # verify the others aren't
-        for attr in 'name', 'mode', 'closed':
-            self.assertRaises((AttributeError, TypeError), setattr, f, attr, 'oops')
-
     def testReadinto(self):
         # verify readinto
-        self.f.write('12')
+        self.f.write(b'12')
         self.f.close()
-        a = array('c', 'x'*10)
-        self.f = open(TESTFN, 'rb')
+        a = array('b', b'x'*10)
+        self.f = self.open(TESTFN, 'rb')
         n = self.f.readinto(a)
-        self.assertEquals('12', a.tostring()[:n])
+        self.assertEquals(b'12', a.tostring()[:n])
+
+    def testReadinto_text(self):
+        # verify readinto refuses text files
+        a = array('b', b'x'*10)
+        self.f.close()
+        self.f = self.open(TESTFN, 'r')
+        if hasattr(self.f, "readinto"):
+            self.assertRaises(TypeError, self.f.readinto, a)
 
     def testWritelinesUserList(self):
         # verify writelines with instance sequence
-        l = UserList(['1', '2'])
+        l = UserList([b'1', b'2'])
         self.f.writelines(l)
         self.f.close()
-        self.f = open(TESTFN, 'rb')
+        self.f = self.open(TESTFN, 'rb')
         buf = self.f.read()
-        self.assertEquals(buf, '12')
+        self.assertEquals(buf, b'12')
 
     def testWritelinesIntegers(self):
         # verify writelines with integers
@@ -81,36 +85,43 @@
         self.assertRaises(TypeError, self.f.writelines,
                           [NonString(), NonString()])
 
-    def testRepr(self):
-        # verify repr works
-        self.assert_(repr(self.f).startswith("<open file '" + TESTFN))
-
     def testErrors(self):
         f = self.f
         self.assertEquals(f.name, TESTFN)
         self.assert_(not f.isatty())
         self.assert_(not f.closed)
 
-        self.assertRaises(TypeError, f.readinto, "")
+        if hasattr(f, "readinto"):
+            self.assertRaises((IOError, TypeError), f.readinto, "")
         f.close()
         self.assert_(f.closed)
 
     def testMethods(self):
-        methods = ['fileno', 'flush', 'isatty', 'next', 'read', 'readinto',
-                   'readline', 'readlines', 'seek', 'tell', 'truncate',
-                   'write', 'xreadlines', '__iter__']
-        if sys.platform.startswith('atheos'):
-            methods.remove('truncate')
+        methods = [('fileno', ()),
+                   ('flush', ()),
+                   ('isatty', ()),
+                   ('next', ()),
+                   ('read', ()),
+                   ('write', (b"",)),
+                   ('readline', ()),
+                   ('readlines', ()),
+                   ('seek', (0,)),
+                   ('tell', ()),
+                   ('write', (b"",)),
+                   ('writelines', ([],)),
+                   ('__iter__', ()),
+                   ]
+        if not sys.platform.startswith('atheos'):
+            methods.append(('truncate', ()))
 
         # __exit__ should close the file
         self.f.__exit__(None, None, None)
         self.assert_(self.f.closed)
 
-        for methodname in methods:
+        for methodname, args in methods:
             method = getattr(self.f, methodname)
             # should raise on closed file
-            self.assertRaises(ValueError, method)
-        self.assertRaises(ValueError, self.f.writelines, [])
+            self.assertRaises(ValueError, method, *args)
 
         # file is closed, __exit__ shouldn't do anything
         self.assertEquals(self.f.__exit__(None, None, None), None)
@@ -123,70 +134,47 @@
     def testReadWhenWriting(self):
         self.assertRaises(IOError, self.f.read)
 
-class OtherFileTests(unittest.TestCase):
+class CAutoFileTests(AutoFileTests):
+    open = io.open
+
+class PyAutoFileTests(AutoFileTests):
+    open = staticmethod(pyio.open)
 
-    def testOpenDir(self):
-        this_dir = os.path.dirname(__file__)
-        for mode in (None, "w"):
-            try:
-                if mode:
-                    f = open(this_dir, mode)
-                else:
-                    f = open(this_dir)
-            except IOError as e:
-                self.assertEqual(e.filename, this_dir)
-            else:
-                self.fail("opening a directory didn't raise an IOError")
+
+class OtherFileTests(unittest.TestCase):
 
     def testModeStrings(self):
         # check invalid mode strings
         for mode in ("", "aU", "wU+"):
             try:
-                f = open(TESTFN, mode)
+                f = self.open(TESTFN, mode)
             except ValueError:
                 pass
             else:
                 f.close()
                 self.fail('%r is an invalid file mode' % mode)
 
-        # Some invalid modes fail on Windows, but pass on Unix
-        # Issue3965: avoid a crash on Windows when filename is unicode
-        for name in (TESTFN, unicode(TESTFN), unicode(TESTFN + '\t')):
-            try:
-                f = open(name, "rr")
-            except (IOError, ValueError):
-                pass
-            else:
-                f.close()
-
     def testStdin(self):
         # This causes the interpreter to exit on OSF1 v5.1.
         if sys.platform != 'osf1V5':
-            self.assertRaises(IOError, sys.stdin.seek, -1)
+            self.assertRaises((IOError, ValueError), sys.stdin.seek, -1)
         else:
-            print >>sys.__stdout__, (
+            print((
                 '  Skipping sys.stdin.seek(-1), it may crash the interpreter.'
-                ' Test manually.')
-        self.assertRaises(IOError, sys.stdin.truncate)
-
-    def testUnicodeOpen(self):
-        # verify repr works for unicode too
-        f = open(unicode(TESTFN), "w")
-        self.assert_(repr(f).startswith("<open file u'" + TESTFN))
-        f.close()
-        os.unlink(TESTFN)
+                ' Test manually.'), file=sys.__stdout__)
+        self.assertRaises((IOError, ValueError), sys.stdin.truncate)
 
     def testBadModeArgument(self):
         # verify that we get a sensible error message for bad mode argument
         bad_mode = "qwerty"
         try:
-            f = open(TESTFN, bad_mode)
-        except ValueError, msg:
-            if msg[0] != 0:
+            f = self.open(TESTFN, bad_mode)
+        except ValueError as msg:
+            if msg.args[0] != 0:
                 s = str(msg)
                 if s.find(TESTFN) != -1 or s.find(bad_mode) == -1:
                     self.fail("bad error message for invalid mode: %s" % s)
-            # if msg[0] == 0, we're probably on Windows where there may be
+            # if msg.args[0] == 0, we're probably on Windows where there may be
             # no obvious way to discover why open() failed.
         else:
             f.close()
@@ -197,31 +185,32 @@
         # misbehaviour especially with repeated close() calls
         for s in (-1, 0, 1, 512):
             try:
-                f = open(TESTFN, 'w', s)
-                f.write(str(s))
+                f = self.open(TESTFN, 'wb', s)
+                f.write(str(s).encode("ascii"))
                 f.close()
                 f.close()
-                f = open(TESTFN, 'r', s)
-                d = int(f.read())
+                f = self.open(TESTFN, 'rb', s)
+                d = int(f.read().decode("ascii"))
                 f.close()
                 f.close()
-            except IOError, msg:
+            except IOError as msg:
                 self.fail('error setting buffer size %d: %s' % (s, str(msg)))
             self.assertEquals(d, s)
 
     def testTruncateOnWindows(self):
+        # SF bug <http://www.python.org/sf/801631>
+        # "file.truncate fault on windows"
+
         os.unlink(TESTFN)
+        f = self.open(TESTFN, 'wb')
 
-        def bug801631():
-            # SF bug <http://www.python.org/sf/801631>
-            # "file.truncate fault on windows"
-            f = open(TESTFN, 'wb')
-            f.write('12345678901')   # 11 bytes
+        try:
+            f.write(b'12345678901')   # 11 bytes
             f.close()
 
-            f = open(TESTFN,'rb+')
+            f = self.open(TESTFN,'rb+')
             data = f.read(5)
-            if data != '12345':
+            if data != b'12345':
                 self.fail("Read on file opened for update failed %r" % data)
             if f.tell() != 5:
                 self.fail("File pos after read wrong %d" % f.tell())
@@ -234,56 +223,42 @@
             size = os.path.getsize(TESTFN)
             if size != 5:
                 self.fail("File size after ftruncate wrong %d" % size)
-
-        try:
-            bug801631()
         finally:
+            f.close()
             os.unlink(TESTFN)
 
     def testIteration(self):
         # Test the complex interaction when mixing file-iteration and the
-        # various read* methods. Ostensibly, the mixture could just be tested
-        # to work when it should work according to the Python language,
-        # instead of fail when it should fail according to the current CPython
-        # implementation.  People don't always program Python the way they
-        # should, though, and the implemenation might change in subtle ways,
-        # so we explicitly test for errors, too; the test will just have to
-        # be updated when the implementation changes.
+        # various read* methods.
         dataoffset = 16384
-        filler = "ham\n"
+        filler = b"ham\n"
         assert not dataoffset % len(filler), \
             "dataoffset must be multiple of len(filler)"
         nchunks = dataoffset // len(filler)
         testlines = [
-            "spam, spam and eggs\n",
-            "eggs, spam, ham and spam\n",
-            "saussages, spam, spam and eggs\n",
-            "spam, ham, spam and eggs\n",
-            "spam, spam, spam, spam, spam, ham, spam\n",
-            "wonderful spaaaaaam.\n"
+            b"spam, spam and eggs\n",
+            b"eggs, spam, ham and spam\n",
+            b"saussages, spam, spam and eggs\n",
+            b"spam, ham, spam and eggs\n",
+            b"spam, spam, spam, spam, spam, ham, spam\n",
+            b"wonderful spaaaaaam.\n"
         ]
         methods = [("readline", ()), ("read", ()), ("readlines", ()),
-                   ("readinto", (array("c", " "*100),))]
+                   ("readinto", (array("b", b" "*100),))]
 
         try:
             # Prepare the testfile
-            bag = open(TESTFN, "w")
+            bag = self.open(TESTFN, "wb")
             bag.write(filler * nchunks)
             bag.writelines(testlines)
             bag.close()
             # Test for appropriate errors mixing read* and iteration
             for methodname, args in methods:
-                f = open(TESTFN)
-                if f.next() != filler:
+                f = self.open(TESTFN, 'rb')
+                if next(f) != filler:
                     self.fail, "Broken testfile"
                 meth = getattr(f, methodname)
-                try:
-                    meth(*args)
-                except ValueError:
-                    pass
-                else:
-                    self.fail("%s%r after next() didn't raise ValueError" %
-                                     (methodname, args))
+                meth(*args)  # This simply shouldn't fail
                 f.close()
 
             # Test to see if harmless (by accident) mixing of read* and
@@ -293,9 +268,9 @@
             # ("h", "a", "m", "\n"), so 4096 lines of that should get us
             # exactly on the buffer boundary for any power-of-2 buffersize
             # between 4 and 16384 (inclusive).
-            f = open(TESTFN)
+            f = self.open(TESTFN, 'rb')
             for i in range(nchunks):
-                f.next()
+                next(f)
             testline = testlines.pop(0)
             try:
                 line = f.readline()
@@ -306,7 +281,7 @@
                 self.fail("readline() after next() with empty buffer "
                           "failed. Got %r, expected %r" % (line, testline))
             testline = testlines.pop(0)
-            buf = array("c", "\x00" * len(testline))
+            buf = array("b", b"\x00" * len(testline))
             try:
                 f.readinto(buf)
             except ValueError:
@@ -335,7 +310,7 @@
                 self.fail("readlines() after next() with empty buffer "
                           "failed. Got %r, expected %r" % (line, testline))
             # Reading after iteration hit EOF shouldn't hurt either
-            f = open(TESTFN)
+            f = self.open(TESTFN, 'rb')
             try:
                 for line in f:
                     pass
@@ -351,222 +326,19 @@
         finally:
             os.unlink(TESTFN)
 
-class FileSubclassTests(unittest.TestCase):
-
-    def testExit(self):
-        # test that exiting with context calls subclass' close
-        class C(file):
-            def __init__(self, *args):
-                self.subclass_closed = False
-                file.__init__(self, *args)
-            def close(self):
-                self.subclass_closed = True
-                file.close(self)
+class COtherFileTests(OtherFileTests):
+    open = io.open
 
-        with C(TESTFN, 'w') as f:
-            pass
-        self.failUnless(f.subclass_closed)
-
-
-class FileThreadingTests(unittest.TestCase):
-    # These tests check the ability to call various methods of file objects
-    # (including close()) concurrently without crashing the Python interpreter.
-    # See #815646, #595601
-
-    def setUp(self):
-        self.f = None
-        self.filename = TESTFN
-        with open(self.filename, "w") as f:
-            f.write("\n".join("0123456789"))
-        self._count_lock = threading.Lock()
-        self.close_count = 0
-        self.close_success_count = 0
-
-    def tearDown(self):
-        if self.f:
-            try:
-                self.f.close()
-            except (EnvironmentError, ValueError):
-                pass
-        try:
-            os.remove(self.filename)
-        except EnvironmentError:
-            pass
-
-    def _create_file(self):
-        self.f = open(self.filename, "w+")
-
-    def _close_file(self):
-        with self._count_lock:
-            self.close_count += 1
-        self.f.close()
-        with self._count_lock:
-            self.close_success_count += 1
-
-    def _close_and_reopen_file(self):
-        self._close_file()
-        # if close raises an exception thats fine, self.f remains valid so
-        # we don't need to reopen.
-        self._create_file()
-
-    def _run_workers(self, func, nb_workers, duration=0.2):
-        with self._count_lock:
-            self.close_count = 0
-            self.close_success_count = 0
-        self.do_continue = True
-        threads = []
-        try:
-            for i in range(nb_workers):
-                t = threading.Thread(target=func)
-                t.start()
-                threads.append(t)
-            for _ in xrange(100):
-                time.sleep(duration/100)
-                with self._count_lock:
-                    if self.close_count-self.close_success_count > nb_workers+1:
-                        if test_support.verbose:
-                            print 'Q',
-                        break
-            time.sleep(duration)
-        finally:
-            self.do_continue = False
-            for t in threads:
-                t.join()
-
-    def _test_close_open_io(self, io_func, nb_workers=5):
-        def worker():
-            self._create_file()
-            funcs = itertools.cycle((
-                lambda: io_func(),
-                lambda: self._close_and_reopen_file(),
-            ))
-            for f in funcs:
-                if not self.do_continue:
-                    break
-                try:
-                    f()
-                except (IOError, ValueError):
-                    pass
-        self._run_workers(worker, nb_workers)
-        if test_support.verbose:
-            # Useful verbose statistics when tuning this test to take
-            # less time to run but still ensuring that its still useful.
-            #
-            # the percent of close calls that raised an error
-            percent = 100. - 100.*self.close_success_count/self.close_count
-            print self.close_count, ('%.4f ' % percent),
-
-    def test_close_open(self):
-        def io_func():
-            pass
-        self._test_close_open_io(io_func)
-
-    def test_close_open_flush(self):
-        def io_func():
-            self.f.flush()
-        self._test_close_open_io(io_func)
-
-    def test_close_open_iter(self):
-        def io_func():
-            list(iter(self.f))
-        self._test_close_open_io(io_func)
-
-    def test_close_open_isatty(self):
-        def io_func():
-            self.f.isatty()
-        self._test_close_open_io(io_func)
-
-    def test_close_open_print(self):
-        def io_func():
-            print >> self.f, ''
-        self._test_close_open_io(io_func)
-
-    def test_close_open_read(self):
-        def io_func():
-            self.f.read(0)
-        self._test_close_open_io(io_func)
-
-    def test_close_open_readinto(self):
-        def io_func():
-            a = array('c', 'xxxxx')
-            self.f.readinto(a)
-        self._test_close_open_io(io_func)
-
-    def test_close_open_readline(self):
-        def io_func():
-            self.f.readline()
-        self._test_close_open_io(io_func)
-
-    def test_close_open_readlines(self):
-        def io_func():
-            self.f.readlines()
-        self._test_close_open_io(io_func)
-
-    def test_close_open_seek(self):
-        def io_func():
-            self.f.seek(0, 0)
-        self._test_close_open_io(io_func)
-
-    def test_close_open_tell(self):
-        def io_func():
-            self.f.tell()
-        self._test_close_open_io(io_func)
-
-    def test_close_open_truncate(self):
-        def io_func():
-            self.f.truncate()
-        self._test_close_open_io(io_func)
-
-    def test_close_open_write(self):
-        def io_func():
-            self.f.write('')
-        self._test_close_open_io(io_func)
-
-    def test_close_open_writelines(self):
-        def io_func():
-            self.f.writelines('')
-        self._test_close_open_io(io_func)
-
-
-class StdoutTests(unittest.TestCase):
-
-    def test_move_stdout_on_write(self):
-        # Issue 3242: sys.stdout can be replaced (and freed) during a
-        # print statement; prevent a segfault in this case
-        save_stdout = sys.stdout
-
-        class File:
-            def write(self, data):
-                if '\n' in data:
-                    sys.stdout = save_stdout
-
-        try:
-            sys.stdout = File()
-            print "some text"
-        finally:
-            sys.stdout = save_stdout
-
-    def test_del_stdout_before_print(self):
-        # Issue 4597: 'print' with no argument wasn't reporting when
-        # sys.stdout was deleted.
-        save_stdout = sys.stdout
-        del sys.stdout
-        try:
-            print
-        except RuntimeError as e:
-            self.assertEquals(str(e), "lost sys.stdout")
-        else:
-            self.fail("Expected RuntimeError")
-        finally:
-            sys.stdout = save_stdout
+class PyOtherFileTests(OtherFileTests):
+    open = staticmethod(pyio.open)
 
 
 def test_main():
     # Historically, these tests have been sloppy about removing TESTFN.
     # So get rid of it no matter what.
     try:
-        run_unittest(AutoFileTests, OtherFileTests, FileSubclassTests,
-            FileThreadingTests, StdoutTests)
+        run_unittest(CAutoFileTests, PyAutoFileTests,
+                     COtherFileTests, PyOtherFileTests)
     finally:
         if os.path.exists(TESTFN):
             os.unlink(TESTFN)

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_fileio.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_fileio.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_fileio.py	Sat Jun 20 00:11:15 2009
@@ -1,23 +1,26 @@
 # Adapted from test_file.py by Daniel Stutzbach
-#from __future__ import unicode_literals
+
+from __future__ import unicode_literals
 
 import sys
 import os
+import errno
 import unittest
 from array import array
 from weakref import proxy
+from functools import wraps
 
 from test.test_support import (TESTFN, findfile, check_warnings, run_unittest,
                                make_bad_fd)
-from UserList import UserList
+from test.test_support import py3k_bytes as bytes
 
-import _fileio
+from _io import FileIO as _FileIO
 
 class AutoFileTests(unittest.TestCase):
     # file tests for which a test file is automatically set up
 
     def setUp(self):
-        self.f = _fileio._FileIO(TESTFN, 'w')
+        self.f = _FileIO(TESTFN, 'w')
 
     def tearDown(self):
         if self.f:
@@ -34,7 +37,7 @@
         self.assertRaises(ReferenceError, getattr, p, 'tell')
 
     def testSeekTell(self):
-        self.f.write(bytes(bytearray(range(20))))
+        self.f.write(bytes(range(20)))
         self.assertEquals(self.f.tell(), 20)
         self.f.seek(0)
         self.assertEquals(self.f.tell(), 0)
@@ -61,17 +64,21 @@
 
     def testReadinto(self):
         # verify readinto
-        self.f.write(bytes(bytearray([1, 2])))
+        self.f.write(b"\x01\x02")
         self.f.close()
-        a = array('b', b'x'*10)
-        self.f = _fileio._FileIO(TESTFN, 'r')
+        a = array(b'b', b'x'*10)
+        self.f = _FileIO(TESTFN, 'r')
         n = self.f.readinto(a)
-        self.assertEquals(array('b', [1, 2]), a[:n])
+        self.assertEquals(array(b'b', [1, 2]), a[:n])
 
     def testRepr(self):
-        self.assertEquals(repr(self.f),
-                          "_fileio._FileIO(%d, %s)" % (self.f.fileno(),
-                                                       repr(self.f.mode)))
+        self.assertEquals(repr(self.f), "<_io.FileIO name=%r mode='%s'>"
+                                        % (self.f.name, self.f.mode))
+        del self.f.name
+        self.assertEquals(repr(self.f), "<_io.FileIO fd=%r mode='%s'>"
+                                        % (self.f.fileno(), self.f.mode))
+        self.f.close()
+        self.assertEquals(repr(self.f), "<_io.FileIO [closed]>")
 
     def testErrors(self):
         f = self.f
@@ -81,7 +88,7 @@
         self.assertRaises(ValueError, f.read, 10) # Open for reading
         f.close()
         self.assert_(f.closed)
-        f = _fileio._FileIO(TESTFN, 'r')
+        f = _FileIO(TESTFN, 'r')
         self.assertRaises(TypeError, f.readinto, "")
         self.assert_(not f.closed)
         f.close()
@@ -107,31 +114,131 @@
         # Windows always returns "[Errno 13]: Permission denied
         # Unix calls dircheck() and returns "[Errno 21]: Is a directory"
         try:
-            _fileio._FileIO('.', 'r')
+            _FileIO('.', 'r')
         except IOError as e:
             self.assertNotEqual(e.errno, 0)
             self.assertEqual(e.filename, ".")
         else:
             self.fail("Should have raised IOError")
 
+    #A set of functions testing that we get expected behaviour if someone has
+    #manually closed the internal file descriptor.  First, a decorator:
+    def ClosedFD(func):
+        @wraps(func)
+        def wrapper(self):
+            #forcibly close the fd before invoking the problem function
+            f = self.f
+            os.close(f.fileno())
+            try:
+                func(self, f)
+            finally:
+                try:
+                    self.f.close()
+                except IOError:
+                    pass
+        return wrapper
+
+    def ClosedFDRaises(func):
+        @wraps(func)
+        def wrapper(self):
+            #forcibly close the fd before invoking the problem function
+            f = self.f
+            os.close(f.fileno())
+            try:
+                func(self, f)
+            except IOError as e:
+                self.assertEqual(e.errno, errno.EBADF)
+            else:
+                self.fail("Should have raised IOError")
+            finally:
+                try:
+                    self.f.close()
+                except IOError:
+                    pass
+        return wrapper
+
+    @ClosedFDRaises
+    def testErrnoOnClose(self, f):
+        f.close()
+
+    @ClosedFDRaises
+    def testErrnoOnClosedWrite(self, f):
+        f.write('a')
+
+    @ClosedFDRaises
+    def testErrnoOnClosedSeek(self, f):
+        f.seek(0)
+
+    @ClosedFDRaises
+    def testErrnoOnClosedTell(self, f):
+        f.tell()
+
+    @ClosedFDRaises
+    def testErrnoOnClosedTruncate(self, f):
+        f.truncate(0)
+
+    @ClosedFD
+    def testErrnoOnClosedSeekable(self, f):
+        f.seekable()
+
+    @ClosedFD
+    def testErrnoOnClosedReadable(self, f):
+        f.readable()
+
+    @ClosedFD
+    def testErrnoOnClosedWritable(self, f):
+        f.writable()
+
+    @ClosedFD
+    def testErrnoOnClosedFileno(self, f):
+        f.fileno()
+
+    @ClosedFD
+    def testErrnoOnClosedIsatty(self, f):
+        self.assertEqual(f.isatty(), False)
+
+    def ReopenForRead(self):
+        try:
+            self.f.close()
+        except IOError:
+            pass
+        self.f = _FileIO(TESTFN, 'r')
+        os.close(self.f.fileno())
+        return self.f
+
+    @ClosedFDRaises
+    def testErrnoOnClosedRead(self, f):
+        f = self.ReopenForRead()
+        f.read(1)
+
+    @ClosedFDRaises
+    def testErrnoOnClosedReadall(self, f):
+        f = self.ReopenForRead()
+        f.readall()
+
+    @ClosedFDRaises
+    def testErrnoOnClosedReadinto(self, f):
+        f = self.ReopenForRead()
+        a = array(b'b', b'x'*10)
+        f.readinto(a)
 
 class OtherFileTests(unittest.TestCase):
 
     def testAbles(self):
         try:
-            f = _fileio._FileIO(TESTFN, "w")
+            f = _FileIO(TESTFN, "w")
             self.assertEquals(f.readable(), False)
             self.assertEquals(f.writable(), True)
             self.assertEquals(f.seekable(), True)
             f.close()
 
-            f = _fileio._FileIO(TESTFN, "r")
+            f = _FileIO(TESTFN, "r")
             self.assertEquals(f.readable(), True)
             self.assertEquals(f.writable(), False)
             self.assertEquals(f.seekable(), True)
             f.close()
 
-            f = _fileio._FileIO(TESTFN, "a+")
+            f = _FileIO(TESTFN, "a+")
             self.assertEquals(f.readable(), True)
             self.assertEquals(f.writable(), True)
             self.assertEquals(f.seekable(), True)
@@ -140,14 +247,14 @@
 
             if sys.platform != "win32":
                 try:
-                    f = _fileio._FileIO("/dev/tty", "a")
+                    f = _FileIO("/dev/tty", "a")
                 except EnvironmentError:
                     # When run in a cron job there just aren't any
                     # ttys, so skip the test.  This also handles other
                     # OS'es that don't support /dev/tty.
                     pass
                 else:
-                    f = _fileio._FileIO("/dev/tty", "a")
+                    f = _FileIO("/dev/tty", "a")
                     self.assertEquals(f.readable(), False)
                     self.assertEquals(f.writable(), True)
                     if sys.platform != "darwin" and \
@@ -164,7 +271,7 @@
         # check invalid mode strings
         for mode in ("", "aU", "wU+", "rw", "rt"):
             try:
-                f = _fileio._FileIO(TESTFN, mode)
+                f = _FileIO(TESTFN, mode)
             except ValueError:
                 pass
             else:
@@ -173,19 +280,35 @@
 
     def testUnicodeOpen(self):
         # verify repr works for unicode too
-        f = _fileio._FileIO(str(TESTFN), "w")
+        f = _FileIO(str(TESTFN), "w")
         f.close()
         os.unlink(TESTFN)
 
+    def testBytesOpen(self):
+        # Opening a bytes filename
+        try:
+            fn = TESTFN.encode("ascii")
+        except UnicodeEncodeError:
+            # Skip test
+            return
+        f = _FileIO(fn, "w")
+        try:
+            f.write(b"abc")
+            f.close()
+            with open(TESTFN, "rb") as f:
+                self.assertEquals(f.read(), b"abc")
+        finally:
+            os.unlink(TESTFN)
+
     def testInvalidFd(self):
-        self.assertRaises(ValueError, _fileio._FileIO, -10)
-        self.assertRaises(OSError, _fileio._FileIO, make_bad_fd())
+        self.assertRaises(ValueError, _FileIO, -10)
+        self.assertRaises(OSError, _FileIO, make_bad_fd())
 
     def testBadModeArgument(self):
         # verify that we get a sensible error message for bad mode argument
         bad_mode = "qwerty"
         try:
-            f = _fileio._FileIO(TESTFN, bad_mode)
+            f = _FileIO(TESTFN, bad_mode)
         except ValueError as msg:
             if msg.args[0] != 0:
                 s = str(msg)
@@ -201,13 +324,13 @@
         def bug801631():
             # SF bug <http://www.python.org/sf/801631>
             # "file.truncate fault on windows"
-            f = _fileio._FileIO(TESTFN, 'w')
-            f.write(bytes(bytearray(range(11))))
+            f = _FileIO(TESTFN, 'w')
+            f.write(bytes(range(11)))
             f.close()
 
-            f = _fileio._FileIO(TESTFN,'r+')
+            f = _FileIO(TESTFN,'r+')
             data = f.read(5)
-            if data != bytes(bytearray(range(5))):
+            if data != bytes(range(5)):
                 self.fail("Read on file opened for update failed %r" % data)
             if f.tell() != 5:
                 self.fail("File pos after read wrong %d" % f.tell())
@@ -245,14 +368,14 @@
                 pass
 
     def testInvalidInit(self):
-        self.assertRaises(TypeError, _fileio._FileIO, "1", 0, 0)
+        self.assertRaises(TypeError, _FileIO, "1", 0, 0)
 
     def testWarnings(self):
         with check_warnings() as w:
             self.assertEqual(w.warnings, [])
-            self.assertRaises(TypeError, _fileio._FileIO, [])
+            self.assertRaises(TypeError, _FileIO, [])
             self.assertEqual(w.warnings, [])
-            self.assertRaises(ValueError, _fileio._FileIO, "/some/invalid/name", "rt")
+            self.assertRaises(ValueError, _FileIO, "/some/invalid/name", "rt")
             self.assertEqual(w.warnings, [])
 
 

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_generators.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_generators.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_generators.py	Sat Jun 20 00:11:15 2009
@@ -1588,7 +1588,7 @@
 Traceback (most recent call last):
   ...
   File "<doctest test.test_generators.__test__.coroutine[25]>", line 1
-SyntaxError: augmented assignment to yield expression not possible
+SyntaxError: can't assign to yield expression
 
 
 Now check some throw() conditions:

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_genexps.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_genexps.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_genexps.py	Sat Jun 20 00:11:15 2009
@@ -144,7 +144,7 @@
     Traceback (most recent call last):
        ...
       File "<doctest test.test_genexps.__test__.doctests[41]>", line 1
-    SyntaxError: augmented assignment to generator expression not possible
+    SyntaxError: can't assign to generator expression
 
 
 ########### Tests borrowed from or inspired by test_generators.py ############

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_io.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_io.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_io.py	Sat Jun 20 00:11:15 2009
@@ -1,4 +1,24 @@
-"""Unit tests for io.py."""
+"""Unit tests for the io module."""
+
+# Tests of io are scattered over the test suite:
+# * test_bufio - tests file buffering
+# * test_memoryio - tests BytesIO and StringIO
+# * test_fileio - tests FileIO
+# * test_file - tests the file interface
+# * test_io - tests everything else in the io module
+# * test_univnewlines - tests universal newline support
+# * test_largefile - tests operations on a file greater than 2**32 bytes
+#     (only enabled with -ulargefile)
+
+################################################################################
+# ATTENTION TEST WRITERS!!!
+################################################################################
+# When writing tests for io, it's important to test both the C and Python
+# implementations. This is usually done by writing a base test that refers to
+# the type it is testing as a attribute. Then it provides custom subclasses to
+# test both implementations. This file has lots of examples.
+################################################################################
+
 from __future__ import print_function
 from __future__ import unicode_literals
 
@@ -9,27 +29,43 @@
 import threading
 import random
 import unittest
-from itertools import chain, cycle
-from test import test_support
+import warnings
+import weakref
+import gc
+import abc
+from itertools import chain, cycle, count
+from collections import deque
+from test import test_support as support
 
 import codecs
-import io  # The module under test
+import io  # C implementation of io
+import _pyio as pyio # Python implementation of io
+
+__metaclass__ = type
+bytes = support.py3k_bytes
+
+def _default_chunk_size():
+    """Get the default TextIOWrapper chunk size"""
+    with io.open(__file__, "r", encoding="latin1") as f:
+        return f._CHUNK_SIZE
 
 
-class MockRawIO(io.RawIOBase):
+class MockRawIO:
 
     def __init__(self, read_stack=()):
         self._read_stack = list(read_stack)
         self._write_stack = []
+        self._reads = 0
 
     def read(self, n=None):
+        self._reads += 1
         try:
             return self._read_stack.pop(0)
         except:
             return b""
 
     def write(self, b):
-        self._write_stack.append(b[:])
+        self._write_stack.append(bytes(b))
         return len(b)
 
     def writable(self):
@@ -45,46 +81,156 @@
         return True
 
     def seek(self, pos, whence):
-        pass
+        return 0   # wrong but we gotta return something
 
     def tell(self):
-        return 42
+        return 0   # same comment as above
+
+    def readinto(self, buf):
+        self._reads += 1
+        max_len = len(buf)
+        try:
+            data = self._read_stack[0]
+        except IndexError:
+            return 0
+        if data is None:
+            del self._read_stack[0]
+            return None
+        n = len(data)
+        if len(data) <= max_len:
+            del self._read_stack[0]
+            buf[:n] = data
+            return n
+        else:
+            buf[:] = data[:max_len]
+            self._read_stack[0] = data[max_len:]
+            return max_len
+
+    def truncate(self, pos=None):
+        return pos
+
+class CMockRawIO(MockRawIO, io.RawIOBase):
+    pass
+
+class PyMockRawIO(MockRawIO, pyio.RawIOBase):
+    pass
+
+
+class MisbehavedRawIO(MockRawIO):
+    def write(self, b):
+        return MockRawIO.write(self, b) * 2
 
+    def read(self, n=None):
+        return MockRawIO.read(self, n) * 2
+
+    def seek(self, pos, whence):
+        return -123
+
+    def tell(self):
+        return -456
+
+    def readinto(self, buf):
+        MockRawIO.readinto(self, buf)
+        return len(buf) * 5
+
+class CMisbehavedRawIO(MisbehavedRawIO, io.RawIOBase):
+    pass
+
+class PyMisbehavedRawIO(MisbehavedRawIO, pyio.RawIOBase):
+    pass
 
-class MockFileIO(io.BytesIO):
+
+class CloseFailureIO(MockRawIO):
+    closed = 0
+
+    def close(self):
+        if not self.closed:
+            self.closed = 1
+            raise IOError
+
+class CCloseFailureIO(CloseFailureIO, io.RawIOBase):
+    pass
+
+class PyCloseFailureIO(CloseFailureIO, pyio.RawIOBase):
+    pass
+
+
+class MockFileIO:
 
     def __init__(self, data):
         self.read_history = []
-        io.BytesIO.__init__(self, data)
+        super(MockFileIO, self).__init__(data)
 
     def read(self, n=None):
-        res = io.BytesIO.read(self, n)
+        res = super(MockFileIO, self).read(n)
         self.read_history.append(None if res is None else len(res))
         return res
 
+    def readinto(self, b):
+        res = super(MockFileIO, self).readinto(b)
+        self.read_history.append(res)
+        return res
+
+class CMockFileIO(MockFileIO, io.BytesIO):
+    pass
 
-class MockNonBlockWriterIO(io.RawIOBase):
+class PyMockFileIO(MockFileIO, pyio.BytesIO):
+    pass
 
-    def __init__(self, blocking_script):
-        self._blocking_script = list(blocking_script)
+
+class MockNonBlockWriterIO:
+
+    def __init__(self):
         self._write_stack = []
+        self._blocker_char = None
 
-    def write(self, b):
-        self._write_stack.append(b[:])
-        n = self._blocking_script.pop(0)
-        if (n < 0):
-            raise io.BlockingIOError(0, "test blocking", -n)
-        else:
-            return n
+    def pop_written(self):
+        s = b"".join(self._write_stack)
+        self._write_stack[:] = []
+        return s
+
+    def block_on(self, char):
+        """Block when a given char is encountered."""
+        self._blocker_char = char
+
+    def readable(self):
+        return True
+
+    def seekable(self):
+        return True
 
     def writable(self):
         return True
 
+    def write(self, b):
+        b = bytes(b)
+        n = -1
+        if self._blocker_char:
+            try:
+                n = b.index(self._blocker_char)
+            except ValueError:
+                pass
+            else:
+                self._blocker_char = None
+                self._write_stack.append(b[:n])
+                raise self.BlockingIOError(0, "test blocking", n)
+        self._write_stack.append(b)
+        return len(b)
+
+class CMockNonBlockWriterIO(MockNonBlockWriterIO, io.RawIOBase):
+    BlockingIOError = io.BlockingIOError
+
+class PyMockNonBlockWriterIO(MockNonBlockWriterIO, pyio.RawIOBase):
+    BlockingIOError = pyio.BlockingIOError
+
 
 class IOTest(unittest.TestCase):
 
+    def setUp(self):
+        support.unlink(support.TESTFN)
+
     def tearDown(self):
-        test_support.unlink(test_support.TESTFN)
+        support.unlink(support.TESTFN)
 
     def write_ops(self, f):
         self.assertEqual(f.write(b"blah."), 5)
@@ -149,60 +295,71 @@
         self.assertEqual(f.seek(-1, 2), self.LARGE)
         self.assertEqual(f.read(2), b"x")
 
+    def test_invalid_operations(self):
+        # Try writing on a file opened in read mode and vice-versa.
+        for mode in ("w", "wb"):
+            with self.open(support.TESTFN, mode) as fp:
+                self.assertRaises(IOError, fp.read)
+                self.assertRaises(IOError, fp.readline)
+        with self.open(support.TESTFN, "rb") as fp:
+            self.assertRaises(IOError, fp.write, b"blah")
+            self.assertRaises(IOError, fp.writelines, [b"blah\n"])
+        with self.open(support.TESTFN, "r") as fp:
+            self.assertRaises(IOError, fp.write, "blah")
+            self.assertRaises(IOError, fp.writelines, ["blah\n"])
+
     def test_raw_file_io(self):
-        f = io.open(test_support.TESTFN, "wb", buffering=0)
-        self.assertEqual(f.readable(), False)
-        self.assertEqual(f.writable(), True)
-        self.assertEqual(f.seekable(), True)
-        self.write_ops(f)
-        f.close()
-        f = io.open(test_support.TESTFN, "rb", buffering=0)
-        self.assertEqual(f.readable(), True)
-        self.assertEqual(f.writable(), False)
-        self.assertEqual(f.seekable(), True)
-        self.read_ops(f)
-        f.close()
+        with self.open(support.TESTFN, "wb", buffering=0) as f:
+            self.assertEqual(f.readable(), False)
+            self.assertEqual(f.writable(), True)
+            self.assertEqual(f.seekable(), True)
+            self.write_ops(f)
+        with self.open(support.TESTFN, "rb", buffering=0) as f:
+            self.assertEqual(f.readable(), True)
+            self.assertEqual(f.writable(), False)
+            self.assertEqual(f.seekable(), True)
+            self.read_ops(f)
 
     def test_buffered_file_io(self):
-        f = io.open(test_support.TESTFN, "wb")
-        self.assertEqual(f.readable(), False)
-        self.assertEqual(f.writable(), True)
-        self.assertEqual(f.seekable(), True)
-        self.write_ops(f)
-        f.close()
-        f = io.open(test_support.TESTFN, "rb")
-        self.assertEqual(f.readable(), True)
-        self.assertEqual(f.writable(), False)
-        self.assertEqual(f.seekable(), True)
-        self.read_ops(f, True)
-        f.close()
+        with self.open(support.TESTFN, "wb") as f:
+            self.assertEqual(f.readable(), False)
+            self.assertEqual(f.writable(), True)
+            self.assertEqual(f.seekable(), True)
+            self.write_ops(f)
+        with self.open(support.TESTFN, "rb") as f:
+            self.assertEqual(f.readable(), True)
+            self.assertEqual(f.writable(), False)
+            self.assertEqual(f.seekable(), True)
+            self.read_ops(f, True)
 
     def test_readline(self):
-        f = io.open(test_support.TESTFN, "wb")
-        f.write(b"abc\ndef\nxyzzy\nfoo")
-        f.close()
-        f = io.open(test_support.TESTFN, "rb")
-        self.assertEqual(f.readline(), b"abc\n")
-        self.assertEqual(f.readline(10), b"def\n")
-        self.assertEqual(f.readline(2), b"xy")
-        self.assertEqual(f.readline(4), b"zzy\n")
-        self.assertEqual(f.readline(), b"foo")
-        f.close()
+        with self.open(support.TESTFN, "wb") as f:
+            f.write(b"abc\ndef\nxyzzy\nfoo\x00bar\nanother line")
+        with self.open(support.TESTFN, "rb") as f:
+            self.assertEqual(f.readline(), b"abc\n")
+            self.assertEqual(f.readline(10), b"def\n")
+            self.assertEqual(f.readline(2), b"xy")
+            self.assertEqual(f.readline(4), b"zzy\n")
+            self.assertEqual(f.readline(), b"foo\x00bar\n")
+            self.assertEqual(f.readline(), b"another line")
+            self.assertRaises(TypeError, f.readline, 5.3)
+        with self.open(support.TESTFN, "r") as f:
+            self.assertRaises(TypeError, f.readline, 5.3)
 
     def test_raw_bytes_io(self):
-        f = io.BytesIO()
+        f = self.BytesIO()
         self.write_ops(f)
         data = f.getvalue()
         self.assertEqual(data, b"hello world\n")
-        f = io.BytesIO(data)
+        f = self.BytesIO(data)
         self.read_ops(f, True)
 
     def test_large_file_ops(self):
         # On Windows and Mac OSX this test comsumes large resources; It takes
         # a long time to build the >2GB file and takes >2GB of disk space
         # therefore the resource must be enabled to run this test.
-        if sys.platform[:3] in ('win', 'os2') or sys.platform == 'darwin':
-            if not test_support.is_resource_enabled("largefile"):
+        if sys.platform[:3] == 'win' or sys.platform == 'darwin':
+            if not support.is_resource_enabled("largefile"):
                 print("\nTesting large file ops skipped on %s." % sys.platform,
                       file=sys.stderr)
                 print("It requires %d bytes and a long time." % self.LARGE,
@@ -210,22 +367,20 @@
                 print("Use 'regrtest.py -u largefile test_io' to run it.",
                       file=sys.stderr)
                 return
-        f = io.open(test_support.TESTFN, "w+b", 0)
-        self.large_file_ops(f)
-        f.close()
-        f = io.open(test_support.TESTFN, "w+b")
-        self.large_file_ops(f)
-        f.close()
+        with self.open(support.TESTFN, "w+b", 0) as f:
+            self.large_file_ops(f)
+        with self.open(support.TESTFN, "w+b") as f:
+            self.large_file_ops(f)
 
     def test_with_open(self):
         for bufsize in (0, 1, 100):
             f = None
-            with open(test_support.TESTFN, "wb", bufsize) as f:
+            with self.open(support.TESTFN, "wb", bufsize) as f:
                 f.write(b"xxx")
             self.assertEqual(f.closed, True)
             f = None
             try:
-                with open(test_support.TESTFN, "wb", bufsize) as f:
+                with self.open(support.TESTFN, "wb", bufsize) as f:
                     1/0
             except ZeroDivisionError:
                 self.assertEqual(f.closed, True)
@@ -234,60 +389,105 @@
 
     # issue 5008
     def test_append_mode_tell(self):
-        with io.open(test_support.TESTFN, "wb") as f:
+        with self.open(support.TESTFN, "wb") as f:
             f.write(b"xxx")
-        with io.open(test_support.TESTFN, "ab", buffering=0) as f:
+        with self.open(support.TESTFN, "ab", buffering=0) as f:
             self.assertEqual(f.tell(), 3)
-        with io.open(test_support.TESTFN, "ab") as f:
+        with self.open(support.TESTFN, "ab") as f:
             self.assertEqual(f.tell(), 3)
-        with io.open(test_support.TESTFN, "a") as f:
+        with self.open(support.TESTFN, "a") as f:
             self.assert_(f.tell() > 0)
 
     def test_destructor(self):
         record = []
-        class MyFileIO(io.FileIO):
+        class MyFileIO(self.FileIO):
             def __del__(self):
                 record.append(1)
-                io.FileIO.__del__(self)
+                try:
+                    f = super(MyFileIO, self).__del__
+                except AttributeError:
+                    pass
+                else:
+                    f()
             def close(self):
                 record.append(2)
-                io.FileIO.close(self)
+                super(MyFileIO, self).close()
             def flush(self):
                 record.append(3)
-                io.FileIO.flush(self)
-        f = MyFileIO(test_support.TESTFN, "w")
-        f.write("xxx")
+                super(MyFileIO, self).flush()
+        f = MyFileIO(support.TESTFN, "wb")
+        f.write(b"xxx")
+        del f
+        support.gc_collect()
+        self.assertEqual(record, [1, 2, 3])
+        with self.open(support.TESTFN, "rb") as f:
+            self.assertEqual(f.read(), b"xxx")
+
+    def _check_base_destructor(self, base):
+        record = []
+        class MyIO(base):
+            def __init__(self):
+                # This exercises the availability of attributes on object
+                # destruction.
+                # (in the C version, close() is called by the tp_dealloc
+                # function, not by __del__)
+                self.on_del = 1
+                self.on_close = 2
+                self.on_flush = 3
+            def __del__(self):
+                record.append(self.on_del)
+                try:
+                    f = super(MyIO, self).__del__
+                except AttributeError:
+                    pass
+                else:
+                    f()
+            def close(self):
+                record.append(self.on_close)
+                super(MyIO, self).close()
+            def flush(self):
+                record.append(self.on_flush)
+                super(MyIO, self).flush()
+        f = MyIO()
         del f
+        support.gc_collect()
         self.assertEqual(record, [1, 2, 3])
 
+    def test_IOBase_destructor(self):
+        self._check_base_destructor(self.IOBase)
+
+    def test_RawIOBase_destructor(self):
+        self._check_base_destructor(self.RawIOBase)
+
+    def test_BufferedIOBase_destructor(self):
+        self._check_base_destructor(self.BufferedIOBase)
+
+    def test_TextIOBase_destructor(self):
+        self._check_base_destructor(self.TextIOBase)
+
     def test_close_flushes(self):
-        f = io.open(test_support.TESTFN, "wb")
-        f.write(b"xxx")
-        f.close()
-        f = io.open(test_support.TESTFN, "rb")
-        self.assertEqual(f.read(), b"xxx")
-        f.close()
+        with self.open(support.TESTFN, "wb") as f:
+            f.write(b"xxx")
+        with self.open(support.TESTFN, "rb") as f:
+            self.assertEqual(f.read(), b"xxx")
 
-    def XXXtest_array_writes(self):
-        # XXX memory view not available yet
-        a = array.array('i', range(10))
-        n = len(memoryview(a))
-        f = io.open(test_support.TESTFN, "wb", 0)
-        self.assertEqual(f.write(a), n)
-        f.close()
-        f = io.open(test_support.TESTFN, "wb")
-        self.assertEqual(f.write(a), n)
-        f.close()
+    def test_array_writes(self):
+        a = array.array(b'i', range(10))
+        n = len(a.tostring())
+        with self.open(support.TESTFN, "wb", 0) as f:
+            self.assertEqual(f.write(a), n)
+        with self.open(support.TESTFN, "wb") as f:
+            self.assertEqual(f.write(a), n)
 
     def test_closefd(self):
-        self.assertRaises(ValueError, io.open, test_support.TESTFN, 'w',
+        self.assertRaises(ValueError, self.open, support.TESTFN, 'w',
                           closefd=False)
 
-    def testReadClosed(self):
-        with io.open(test_support.TESTFN, "w") as f:
+    def test_read_closed(self):
+        with self.open(support.TESTFN, "w") as f:
             f.write("egg\n")
-        with io.open(test_support.TESTFN, "r") as f:
-            file = io.open(f.fileno(), "r", closefd=False)
+        with self.open(support.TESTFN, "r") as f:
+            file = self.open(f.fileno(), "r", closefd=False)
             self.assertEqual(file.read(), "egg\n")
             file.seek(0)
             file.close()
@@ -295,86 +495,203 @@
 
     def test_no_closefd_with_filename(self):
         # can't use closefd in combination with a file name
-        self.assertRaises(ValueError,
-                          io.open, test_support.TESTFN, "r", closefd=False)
+        self.assertRaises(ValueError, self.open, support.TESTFN, "r", closefd=False)
 
     def test_closefd_attr(self):
-        with io.open(test_support.TESTFN, "wb") as f:
+        with self.open(support.TESTFN, "wb") as f:
             f.write(b"egg\n")
-        with io.open(test_support.TESTFN, "r") as f:
+        with self.open(support.TESTFN, "r") as f:
             self.assertEqual(f.buffer.raw.closefd, True)
-            file = io.open(f.fileno(), "r", closefd=False)
+            file = self.open(f.fileno(), "r", closefd=False)
             self.assertEqual(file.buffer.raw.closefd, False)
 
+    def test_garbage_collection(self):
+        # FileIO objects are collected, and collecting them flushes
+        # all data to disk.
+        f = self.FileIO(support.TESTFN, "wb")
+        f.write(b"abcxxx")
+        f.f = f
+        wr = weakref.ref(f)
+        del f
+        support.gc_collect()
+        self.assert_(wr() is None, wr)
+        with self.open(support.TESTFN, "rb") as f:
+            self.assertEqual(f.read(), b"abcxxx")
+
+    def test_unbounded_file(self):
+        # Issue #1174606: reading from an unbounded stream such as /dev/zero.
+        zero = "/dev/zero"
+        if not os.path.exists(zero):
+            self.skipTest("{0} does not exist".format(zero))
+        if sys.maxsize > 0x7FFFFFFF:
+            self.skipTest("test can only run in a 32-bit address space")
+        if support.real_max_memuse < support._2G:
+            self.skipTest("test requires at least 2GB of memory")
+        with self.open(zero, "rb", buffering=0) as f:
+            self.assertRaises(OverflowError, f.read)
+        with self.open(zero, "rb") as f:
+            self.assertRaises(OverflowError, f.read)
+        with self.open(zero, "r") as f:
+            self.assertRaises(OverflowError, f.read)
+
+class CIOTest(IOTest):
+    pass
+
+class PyIOTest(IOTest):
+    test_array_writes = unittest.skip(
+        "len(array.array) returns number of elements rather than bytelength"
+    )(IOTest.test_array_writes)
+
+
+class CommonBufferedTests:
+    # Tests common to BufferedReader, BufferedWriter and BufferedRandom
+
+    def test_detach(self):
+        raw = self.MockRawIO()
+        buf = self.tp(raw)
+        self.assertIs(buf.detach(), raw)
+        self.assertRaises(ValueError, buf.detach)
+
+    def test_fileno(self):
+        rawio = self.MockRawIO()
+        bufio = self.tp(rawio)
 
-class MemorySeekTestMixin:
-
-    def testInit(self):
-        buf = self.buftype("1234567890")
-        bytesIo = self.ioclass(buf)
-
-    def testRead(self):
-        buf = self.buftype("1234567890")
-        bytesIo = self.ioclass(buf)
-
-        self.assertEquals(buf[:1], bytesIo.read(1))
-        self.assertEquals(buf[1:5], bytesIo.read(4))
-        self.assertEquals(buf[5:], bytesIo.read(900))
-        self.assertEquals(self.EOF, bytesIo.read())
-
-    def testReadNoArgs(self):
-        buf = self.buftype("1234567890")
-        bytesIo = self.ioclass(buf)
-
-        self.assertEquals(buf, bytesIo.read())
-        self.assertEquals(self.EOF, bytesIo.read())
-
-    def testSeek(self):
-        buf = self.buftype("1234567890")
-        bytesIo = self.ioclass(buf)
-
-        bytesIo.read(5)
-        bytesIo.seek(0)
-        self.assertEquals(buf, bytesIo.read())
-
-        bytesIo.seek(3)
-        self.assertEquals(buf[3:], bytesIo.read())
-        self.assertRaises(TypeError, bytesIo.seek, 0.0)
-
-    def testTell(self):
-        buf = self.buftype("1234567890")
-        bytesIo = self.ioclass(buf)
-
-        self.assertEquals(0, bytesIo.tell())
-        bytesIo.seek(5)
-        self.assertEquals(5, bytesIo.tell())
-        bytesIo.seek(10000)
-        self.assertEquals(10000, bytesIo.tell())
-
-
-class BytesIOTest(MemorySeekTestMixin, unittest.TestCase):
-    @staticmethod
-    def buftype(s):
-        return s.encode("utf-8")
-    ioclass = io.BytesIO
-    EOF = b""
-
-
-class StringIOTest(MemorySeekTestMixin, unittest.TestCase):
-    buftype = str
-    ioclass = io.StringIO
-    EOF = ""
+        self.assertEquals(42, bufio.fileno())
 
+    def test_no_fileno(self):
+        # XXX will we always have fileno() function? If so, kill
+        # this test. Else, write it.
+        pass
 
-class BufferedReaderTest(unittest.TestCase):
+    def test_invalid_args(self):
+        rawio = self.MockRawIO()
+        bufio = self.tp(rawio)
+        # Invalid whence
+        self.assertRaises(ValueError, bufio.seek, 0, -1)
+        self.assertRaises(ValueError, bufio.seek, 0, 3)
 
-    def testRead(self):
-        rawio = MockRawIO((b"abc", b"d", b"efg"))
-        bufio = io.BufferedReader(rawio)
+    def test_override_destructor(self):
+        tp = self.tp
+        record = []
+        class MyBufferedIO(tp):
+            def __del__(self):
+                record.append(1)
+                try:
+                    f = super(MyBufferedIO, self).__del__
+                except AttributeError:
+                    pass
+                else:
+                    f()
+            def close(self):
+                record.append(2)
+                super(MyBufferedIO, self).close()
+            def flush(self):
+                record.append(3)
+                super(MyBufferedIO, self).flush()
+        rawio = self.MockRawIO()
+        bufio = MyBufferedIO(rawio)
+        writable = bufio.writable()
+        del bufio
+        support.gc_collect()
+        if writable:
+            self.assertEqual(record, [1, 2, 3])
+        else:
+            self.assertEqual(record, [1, 2])
 
+    def test_context_manager(self):
+        # Test usability as a context manager
+        rawio = self.MockRawIO()
+        bufio = self.tp(rawio)
+        def _with():
+            with bufio:
+                pass
+        _with()
+        # bufio should now be closed, and using it a second time should raise
+        # a ValueError.
+        self.assertRaises(ValueError, _with)
+
+    def test_error_through_destructor(self):
+        # Test that the exception state is not modified by a destructor,
+        # even if close() fails.
+        rawio = self.CloseFailureIO()
+        def f():
+            self.tp(rawio).xyzzy
+        with support.captured_output("stderr") as s:
+            self.assertRaises(AttributeError, f)
+        s = s.getvalue().strip()
+        if s:
+            # The destructor *may* have printed an unraisable error, check it
+            self.assertEqual(len(s.splitlines()), 1)
+            self.assert_(s.startswith("Exception IOError: "), s)
+            self.assert_(s.endswith(" ignored"), s)
+
+    def test_repr(self):
+        raw = self.MockRawIO()
+        b = self.tp(raw)
+        clsname = "%s.%s" % (self.tp.__module__, self.tp.__name__)
+        self.assertEqual(repr(b), "<%s>" % clsname)
+        raw.name = "dummy"
+        self.assertEqual(repr(b), "<%s name=u'dummy'>" % clsname)
+        raw.name = b"dummy"
+        self.assertEqual(repr(b), "<%s name='dummy'>" % clsname)
+
+
+class BufferedReaderTest(unittest.TestCase, CommonBufferedTests):
+    read_mode = "rb"
+
+    def test_constructor(self):
+        rawio = self.MockRawIO([b"abc"])
+        bufio = self.tp(rawio)
+        bufio.__init__(rawio)
+        bufio.__init__(rawio, buffer_size=1024)
+        bufio.__init__(rawio, buffer_size=16)
+        self.assertEquals(b"abc", bufio.read())
+        self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=0)
+        self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-16)
+        self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-1)
+        rawio = self.MockRawIO([b"abc"])
+        bufio.__init__(rawio)
+        self.assertEquals(b"abc", bufio.read())
+
+    def test_read(self):
+        rawio = self.MockRawIO((b"abc", b"d", b"efg"))
+        bufio = self.tp(rawio)
         self.assertEquals(b"abcdef", bufio.read(6))
+        # Invalid args
+        self.assertRaises(ValueError, bufio.read, -2)
 
-    def testBuffering(self):
+    def test_read1(self):
+        rawio = self.MockRawIO((b"abc", b"d", b"efg"))
+        bufio = self.tp(rawio)
+        self.assertEquals(b"a", bufio.read(1))
+        self.assertEquals(b"b", bufio.read1(1))
+        self.assertEquals(rawio._reads, 1)
+        self.assertEquals(b"c", bufio.read1(100))
+        self.assertEquals(rawio._reads, 1)
+        self.assertEquals(b"d", bufio.read1(100))
+        self.assertEquals(rawio._reads, 2)
+        self.assertEquals(b"efg", bufio.read1(100))
+        self.assertEquals(rawio._reads, 3)
+        self.assertEquals(b"", bufio.read1(100))
+        # Invalid args
+        self.assertRaises(ValueError, bufio.read1, -1)
+
+    def test_readinto(self):
+        rawio = self.MockRawIO((b"abc", b"d", b"efg"))
+        bufio = self.tp(rawio)
+        b = bytearray(2)
+        self.assertEquals(bufio.readinto(b), 2)
+        self.assertEquals(b, b"ab")
+        self.assertEquals(bufio.readinto(b), 2)
+        self.assertEquals(b, b"cd")
+        self.assertEquals(bufio.readinto(b), 2)
+        self.assertEquals(b, b"ef")
+        self.assertEquals(bufio.readinto(b), 1)
+        self.assertEquals(b, b"gf")
+        self.assertEquals(bufio.readinto(b), 0)
+        self.assertEquals(b, b"gf")
+
+    def test_buffering(self):
         data = b"abcdefghi"
         dlen = len(data)
 
@@ -385,61 +702,52 @@
         ]
 
         for bufsize, buf_read_sizes, raw_read_sizes in tests:
-            rawio = MockFileIO(data)
-            bufio = io.BufferedReader(rawio, buffer_size=bufsize)
+            rawio = self.MockFileIO(data)
+            bufio = self.tp(rawio, buffer_size=bufsize)
             pos = 0
             for nbytes in buf_read_sizes:
                 self.assertEquals(bufio.read(nbytes), data[pos:pos+nbytes])
                 pos += nbytes
+            # this is mildly implementation-dependent
             self.assertEquals(rawio.read_history, raw_read_sizes)
 
-    def testReadNonBlocking(self):
+    def test_read_non_blocking(self):
         # Inject some None's in there to simulate EWOULDBLOCK
-        rawio = MockRawIO((b"abc", b"d", None, b"efg", None, None))
-        bufio = io.BufferedReader(rawio)
+        rawio = self.MockRawIO((b"abc", b"d", None, b"efg", None, None, None))
+        bufio = self.tp(rawio)
 
         self.assertEquals(b"abcd", bufio.read(6))
         self.assertEquals(b"e", bufio.read(1))
         self.assertEquals(b"fg", bufio.read())
+        self.assertEquals(b"", bufio.peek(1))
         self.assert_(None is bufio.read())
         self.assertEquals(b"", bufio.read())
 
-    def testReadToEof(self):
-        rawio = MockRawIO((b"abc", b"d", b"efg"))
-        bufio = io.BufferedReader(rawio)
+    def test_read_past_eof(self):
+        rawio = self.MockRawIO((b"abc", b"d", b"efg"))
+        bufio = self.tp(rawio)
 
         self.assertEquals(b"abcdefg", bufio.read(9000))
 
-    def testReadNoArgs(self):
-        rawio = MockRawIO((b"abc", b"d", b"efg"))
-        bufio = io.BufferedReader(rawio)
+    def test_read_all(self):
+        rawio = self.MockRawIO((b"abc", b"d", b"efg"))
+        bufio = self.tp(rawio)
 
         self.assertEquals(b"abcdefg", bufio.read())
 
-    def testFileno(self):
-        rawio = MockRawIO((b"abc", b"d", b"efg"))
-        bufio = io.BufferedReader(rawio)
-
-        self.assertEquals(42, bufio.fileno())
-
-    def testFilenoNoFileno(self):
-        # XXX will we always have fileno() function? If so, kill
-        # this test. Else, write it.
-        pass
-
-    def testThreads(self):
+    def test_threads(self):
         try:
             # Write out many bytes with exactly the same number of 0's,
             # 1's... 255's. This will help us check that concurrent reading
             # doesn't duplicate or forget contents.
             N = 1000
-            l = range(256) * N
+            l = list(range(256)) * N
             random.shuffle(l)
             s = bytes(bytearray(l))
-            with io.open(test_support.TESTFN, "wb") as f:
+            with self.open(support.TESTFN, "wb") as f:
                 f.write(s)
-            with io.open(test_support.TESTFN, "rb", buffering=0) as raw:
-                bufio = io.BufferedReader(raw, 8)
+            with self.open(support.TESTFN, self.read_mode, buffering=0) as raw:
+                bufio = self.tp(raw, 8)
                 errors = []
                 results = []
                 def f():
@@ -467,82 +775,242 @@
                     c = bytes(bytearray([i]))
                     self.assertEqual(s.count(c), N)
         finally:
-            test_support.unlink(test_support.TESTFN)
-
+            support.unlink(support.TESTFN)
 
+    def test_misbehaved_io(self):
+        rawio = self.MisbehavedRawIO((b"abc", b"d", b"efg"))
+        bufio = self.tp(rawio)
+        self.assertRaises(IOError, bufio.seek, 0)
+        self.assertRaises(IOError, bufio.tell)
+
+class CBufferedReaderTest(BufferedReaderTest):
+    tp = io.BufferedReader
+
+    def test_constructor(self):
+        BufferedReaderTest.test_constructor(self)
+        # The allocation can succeed on 32-bit builds, e.g. with more
+        # than 2GB RAM and a 64-bit kernel.
+        if sys.maxsize > 0x7FFFFFFF:
+            rawio = self.MockRawIO()
+            bufio = self.tp(rawio)
+            self.assertRaises((OverflowError, MemoryError, ValueError),
+                bufio.__init__, rawio, sys.maxsize)
+
+    def test_initialization(self):
+        rawio = self.MockRawIO([b"abc"])
+        bufio = self.tp(rawio)
+        self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=0)
+        self.assertRaises(ValueError, bufio.read)
+        self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-16)
+        self.assertRaises(ValueError, bufio.read)
+        self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-1)
+        self.assertRaises(ValueError, bufio.read)
+
+    def test_misbehaved_io_read(self):
+        rawio = self.MisbehavedRawIO((b"abc", b"d", b"efg"))
+        bufio = self.tp(rawio)
+        # _pyio.BufferedReader seems to implement reading different, so that
+        # checking this is not so easy.
+        self.assertRaises(IOError, bufio.read, 10)
+
+    def test_garbage_collection(self):
+        # C BufferedReader objects are collected.
+        # The Python version has __del__, so it ends into gc.garbage instead
+        rawio = self.FileIO(support.TESTFN, "w+b")
+        f = self.tp(rawio)
+        f.f = f
+        wr = weakref.ref(f)
+        del f
+        support.gc_collect()
+        self.assert_(wr() is None, wr)
 
-class BufferedWriterTest(unittest.TestCase):
+class PyBufferedReaderTest(BufferedReaderTest):
+    tp = pyio.BufferedReader
 
-    def testWrite(self):
-        # Write to the buffered IO but don't overflow the buffer.
-        writer = MockRawIO()
-        bufio = io.BufferedWriter(writer, 8)
 
-        bufio.write(b"abc")
-
-        self.assertFalse(writer._write_stack)
+class BufferedWriterTest(unittest.TestCase, CommonBufferedTests):
+    write_mode = "wb"
+
+    def test_constructor(self):
+        rawio = self.MockRawIO()
+        bufio = self.tp(rawio)
+        bufio.__init__(rawio)
+        bufio.__init__(rawio, buffer_size=1024)
+        bufio.__init__(rawio, buffer_size=16)
+        self.assertEquals(3, bufio.write(b"abc"))
+        bufio.flush()
+        self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=0)
+        self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-16)
+        self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-1)
+        bufio.__init__(rawio)
+        self.assertEquals(3, bufio.write(b"ghi"))
+        bufio.flush()
+        self.assertEquals(b"".join(rawio._write_stack), b"abcghi")
 
-    def testWriteOverflow(self):
-        writer = MockRawIO()
-        bufio = io.BufferedWriter(writer, 8)
+    def test_detach_flush(self):
+        raw = self.MockRawIO()
+        buf = self.tp(raw)
+        buf.write(b"howdy!")
+        self.assertFalse(raw._write_stack)
+        buf.detach()
+        self.assertEqual(raw._write_stack, [b"howdy!"])
 
+    def test_write(self):
+        # Write to the buffered IO but don't overflow the buffer.
+        writer = self.MockRawIO()
+        bufio = self.tp(writer, 8)
         bufio.write(b"abc")
-        bufio.write(b"defghijkl")
-
-        self.assertEquals(b"abcdefghijkl", writer._write_stack[0])
-
-    def testWriteNonBlocking(self):
-        raw = MockNonBlockWriterIO((9, 2, 22, -6, 10, 12, 12))
-        bufio = io.BufferedWriter(raw, 8, 16)
-
-        bufio.write(b"asdf")
-        bufio.write(b"asdfa")
-        self.assertEquals(b"asdfasdfa", raw._write_stack[0])
-
-        bufio.write(b"asdfasdfasdf")
-        self.assertEquals(b"asdfasdfasdf", raw._write_stack[1])
-        bufio.write(b"asdfasdfasdf")
-        self.assertEquals(b"dfasdfasdf", raw._write_stack[2])
-        self.assertEquals(b"asdfasdfasdf", raw._write_stack[3])
+        self.assertFalse(writer._write_stack)
 
-        bufio.write(b"asdfasdfasdf")
+    def test_write_overflow(self):
+        writer = self.MockRawIO()
+        bufio = self.tp(writer, 8)
+        contents = b"abcdefghijklmnop"
+        for n in range(0, len(contents), 3):
+            bufio.write(contents[n:n+3])
+        flushed = b"".join(writer._write_stack)
+        # At least (total - 8) bytes were implicitly flushed, perhaps more
+        # depending on the implementation.
+        self.assert_(flushed.startswith(contents[:-8]), flushed)
+
+    def check_writes(self, intermediate_func):
+        # Lots of writes, test the flushed output is as expected.
+        contents = bytes(range(256)) * 1000
+        n = 0
+        writer = self.MockRawIO()
+        bufio = self.tp(writer, 13)
+        # Generator of write sizes: repeat each N 15 times then proceed to N+1
+        def gen_sizes():
+            for size in count(1):
+                for i in range(15):
+                    yield size
+        sizes = gen_sizes()
+        while n < len(contents):
+            size = min(next(sizes), len(contents) - n)
+            self.assertEquals(bufio.write(contents[n:n+size]), size)
+            intermediate_func(bufio)
+            n += size
+        bufio.flush()
+        self.assertEquals(contents,
+            b"".join(writer._write_stack))
 
-        # XXX I don't like this test. It relies too heavily on how the
-        # algorithm actually works, which we might change. Refactor
-        # later.
+    def test_writes(self):
+        self.check_writes(lambda bufio: None)
 
-    def testFileno(self):
-        rawio = MockRawIO((b"abc", b"d", b"efg"))
-        bufio = io.BufferedWriter(rawio)
+    def test_writes_and_flushes(self):
+        self.check_writes(lambda bufio: bufio.flush())
 
-        self.assertEquals(42, bufio.fileno())
+    def test_writes_and_seeks(self):
+        def _seekabs(bufio):
+            pos = bufio.tell()
+            bufio.seek(pos + 1, 0)
+            bufio.seek(pos - 1, 0)
+            bufio.seek(pos, 0)
+        self.check_writes(_seekabs)
+        def _seekrel(bufio):
+            pos = bufio.seek(0, 1)
+            bufio.seek(+1, 1)
+            bufio.seek(-1, 1)
+            bufio.seek(pos, 0)
+        self.check_writes(_seekrel)
+
+    def test_writes_and_truncates(self):
+        self.check_writes(lambda bufio: bufio.truncate(bufio.tell()))
+
+    def test_write_non_blocking(self):
+        raw = self.MockNonBlockWriterIO()
+        bufio = self.tp(raw, 8)
+
+        self.assertEquals(bufio.write(b"abcd"), 4)
+        self.assertEquals(bufio.write(b"efghi"), 5)
+        # 1 byte will be written, the rest will be buffered
+        raw.block_on(b"k")
+        self.assertEquals(bufio.write(b"jklmn"), 5)
 
-    def testFlush(self):
-        writer = MockRawIO()
-        bufio = io.BufferedWriter(writer, 8)
+        # 8 bytes will be written, 8 will be buffered and the rest will be lost
+        raw.block_on(b"0")
+        try:
+            bufio.write(b"opqrwxyz0123456789")
+        except self.BlockingIOError as e:
+            written = e.characters_written
+        else:
+            self.fail("BlockingIOError should have been raised")
+        self.assertEquals(written, 16)
+        self.assertEquals(raw.pop_written(),
+            b"abcdefghijklmnopqrwxyz")
+
+        self.assertEquals(bufio.write(b"ABCDEFGHI"), 9)
+        s = raw.pop_written()
+        # Previously buffered bytes were flushed
+        self.assertTrue(s.startswith(b"01234567A"), s)
+
+    def test_write_and_rewind(self):
+        raw = io.BytesIO()
+        bufio = self.tp(raw, 4)
+        self.assertEqual(bufio.write(b"abcdef"), 6)
+        self.assertEqual(bufio.tell(), 6)
+        bufio.seek(0, 0)
+        self.assertEqual(bufio.write(b"XY"), 2)
+        bufio.seek(6, 0)
+        self.assertEqual(raw.getvalue(), b"XYcdef")
+        self.assertEqual(bufio.write(b"123456"), 6)
+        bufio.flush()
+        self.assertEqual(raw.getvalue(), b"XYcdef123456")
 
+    def test_flush(self):
+        writer = self.MockRawIO()
+        bufio = self.tp(writer, 8)
         bufio.write(b"abc")
         bufio.flush()
+        self.assertEquals(b"abc", writer._write_stack[0])
 
+    def test_destructor(self):
+        writer = self.MockRawIO()
+        bufio = self.tp(writer, 8)
+        bufio.write(b"abc")
+        del bufio
+        support.gc_collect()
         self.assertEquals(b"abc", writer._write_stack[0])
 
-    def testThreads(self):
-        # BufferedWriter should not raise exceptions or crash
-        # when called from multiple threads.
+    def test_truncate(self):
+        # Truncate implicitly flushes the buffer.
+        with self.open(support.TESTFN, self.write_mode, buffering=0) as raw:
+            bufio = self.tp(raw, 8)
+            bufio.write(b"abcdef")
+            self.assertEqual(bufio.truncate(3), 3)
+            self.assertEqual(bufio.tell(), 3)
+        with self.open(support.TESTFN, "rb", buffering=0) as f:
+            self.assertEqual(f.read(), b"abc")
+
+    def test_threads(self):
         try:
+            # Write out many bytes from many threads and test they were
+            # all flushed.
+            N = 1000
+            contents = bytes(range(256)) * N
+            sizes = cycle([1, 19])
+            n = 0
+            queue = deque()
+            while n < len(contents):
+                size = next(sizes)
+                queue.append(contents[n:n+size])
+                n += size
+            del contents
             # We use a real file object because it allows us to
             # exercise situations where the GIL is released before
             # writing the buffer to the raw streams. This is in addition
             # to concurrency issues due to switching threads in the middle
             # of Python code.
-            with io.open(test_support.TESTFN, "wb", buffering=0) as raw:
-                bufio = io.BufferedWriter(raw, 8)
+            with self.open(support.TESTFN, self.write_mode, buffering=0) as raw:
+                bufio = self.tp(raw, 8)
                 errors = []
                 def f():
                     try:
-                        # Write enough bytes to flush the buffer
-                        s = b"a" * 19
-                        for i in range(50):
+                        while True:
+                            try:
+                                s = queue.popleft()
+                            except IndexError:
+                                return
                             bufio.write(s)
                     except Exception as e:
                         errors.append(e)
@@ -555,37 +1023,218 @@
                     t.join()
                 self.assertFalse(errors,
                     "the following exceptions were caught: %r" % errors)
+                bufio.close()
+            with self.open(support.TESTFN, "rb") as f:
+                s = f.read()
+            for i in range(256):
+                self.assertEquals(s.count(bytes([i])), N)
         finally:
-            test_support.unlink(test_support.TESTFN)
+            support.unlink(support.TESTFN)
+
+    def test_misbehaved_io(self):
+        rawio = self.MisbehavedRawIO()
+        bufio = self.tp(rawio, 5)
+        self.assertRaises(IOError, bufio.seek, 0)
+        self.assertRaises(IOError, bufio.tell)
+        self.assertRaises(IOError, bufio.write, b"abcdef")
+
+    def test_max_buffer_size_deprecation(self):
+        with support.check_warnings() as w:
+            warnings.simplefilter("always", DeprecationWarning)
+            self.tp(self.MockRawIO(), 8, 12)
+            self.assertEqual(len(w.warnings), 1)
+            warning = w.warnings[0]
+            self.assertTrue(warning.category is DeprecationWarning)
+            self.assertEqual(str(warning.message),
+                             "max_buffer_size is deprecated")
+
+
+class CBufferedWriterTest(BufferedWriterTest):
+    tp = io.BufferedWriter
+
+    def test_constructor(self):
+        BufferedWriterTest.test_constructor(self)
+        # The allocation can succeed on 32-bit builds, e.g. with more
+        # than 2GB RAM and a 64-bit kernel.
+        if sys.maxsize > 0x7FFFFFFF:
+            rawio = self.MockRawIO()
+            bufio = self.tp(rawio)
+            self.assertRaises((OverflowError, MemoryError, ValueError),
+                bufio.__init__, rawio, sys.maxsize)
+
+    def test_initialization(self):
+        rawio = self.MockRawIO()
+        bufio = self.tp(rawio)
+        self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=0)
+        self.assertRaises(ValueError, bufio.write, b"def")
+        self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-16)
+        self.assertRaises(ValueError, bufio.write, b"def")
+        self.assertRaises(ValueError, bufio.__init__, rawio, buffer_size=-1)
+        self.assertRaises(ValueError, bufio.write, b"def")
+
+    def test_garbage_collection(self):
+        # C BufferedWriter objects are collected, and collecting them flushes
+        # all data to disk.
+        # The Python version has __del__, so it ends into gc.garbage instead
+        rawio = self.FileIO(support.TESTFN, "w+b")
+        f = self.tp(rawio)
+        f.write(b"123xxx")
+        f.x = f
+        wr = weakref.ref(f)
+        del f
+        support.gc_collect()
+        self.assert_(wr() is None, wr)
+        with self.open(support.TESTFN, "rb") as f:
+            self.assertEqual(f.read(), b"123xxx")
+
 
+class PyBufferedWriterTest(BufferedWriterTest):
+    tp = pyio.BufferedWriter
 
 class BufferedRWPairTest(unittest.TestCase):
 
-    def testRWPair(self):
-        r = MockRawIO(())
-        w = MockRawIO()
-        pair = io.BufferedRWPair(r, w)
+    def test_constructor(self):
+        pair = self.tp(self.MockRawIO(), self.MockRawIO())
         self.assertFalse(pair.closed)
 
-        # XXX More Tests
+    def test_detach(self):
+        pair = self.tp(self.MockRawIO(), self.MockRawIO())
+        self.assertRaises(self.UnsupportedOperation, pair.detach)
+
+    def test_constructor_max_buffer_size_deprecation(self):
+        with support.check_warnings() as w:
+            warnings.simplefilter("always", DeprecationWarning)
+            self.tp(self.MockRawIO(), self.MockRawIO(), 8, 12)
+            self.assertEqual(len(w.warnings), 1)
+            warning = w.warnings[0]
+            self.assertTrue(warning.category is DeprecationWarning)
+            self.assertEqual(str(warning.message),
+                             "max_buffer_size is deprecated")
+
+    def test_constructor_with_not_readable(self):
+        class NotReadable(MockRawIO):
+            def readable(self):
+                return False
+
+        self.assertRaises(IOError, self.tp, NotReadable(), self.MockRawIO())
+
+    def test_constructor_with_not_writeable(self):
+        class NotWriteable(MockRawIO):
+            def writable(self):
+                return False
+
+        self.assertRaises(IOError, self.tp, self.MockRawIO(), NotWriteable())
+
+    def test_read(self):
+        pair = self.tp(self.BytesIO(b"abcdef"), self.MockRawIO())
+
+        self.assertEqual(pair.read(3), b"abc")
+        self.assertEqual(pair.read(1), b"d")
+        self.assertEqual(pair.read(), b"ef")
+
+    def test_read1(self):
+        # .read1() is delegated to the underlying reader object, so this test
+        # can be shallow.
+        pair = self.tp(self.BytesIO(b"abcdef"), self.MockRawIO())
+
+        self.assertEqual(pair.read1(3), b"abc")
+
+    def test_readinto(self):
+        pair = self.tp(self.BytesIO(b"abcdef"), self.MockRawIO())
+
+        data = bytearray(5)
+        self.assertEqual(pair.readinto(data), 5)
+        self.assertEqual(data, b"abcde")
+
+    def test_write(self):
+        w = self.MockRawIO()
+        pair = self.tp(self.MockRawIO(), w)
+
+        pair.write(b"abc")
+        pair.flush()
+        pair.write(b"def")
+        pair.flush()
+        self.assertEqual(w._write_stack, [b"abc", b"def"])
+
+    def test_peek(self):
+        pair = self.tp(self.BytesIO(b"abcdef"), self.MockRawIO())
+
+        self.assertTrue(pair.peek(3).startswith(b"abc"))
+        self.assertEqual(pair.read(3), b"abc")
+
+    def test_readable(self):
+        pair = self.tp(self.MockRawIO(), self.MockRawIO())
+        self.assertTrue(pair.readable())
+
+    def test_writeable(self):
+        pair = self.tp(self.MockRawIO(), self.MockRawIO())
+        self.assertTrue(pair.writable())
+
+    def test_seekable(self):
+        # BufferedRWPairs are never seekable, even if their readers and writers
+        # are.
+        pair = self.tp(self.MockRawIO(), self.MockRawIO())
+        self.assertFalse(pair.seekable())
+
+    # .flush() is delegated to the underlying writer object and has been
+    # tested in the test_write method.
+
+    def test_close_and_closed(self):
+        pair = self.tp(self.MockRawIO(), self.MockRawIO())
+        self.assertFalse(pair.closed)
+        pair.close()
+        self.assertTrue(pair.closed)
+
+    def test_isatty(self):
+        class SelectableIsAtty(MockRawIO):
+            def __init__(self, isatty):
+                MockRawIO.__init__(self)
+                self._isatty = isatty
+
+            def isatty(self):
+                return self._isatty
+
+        pair = self.tp(SelectableIsAtty(False), SelectableIsAtty(False))
+        self.assertFalse(pair.isatty())
+
+        pair = self.tp(SelectableIsAtty(True), SelectableIsAtty(False))
+        self.assertTrue(pair.isatty())
 
+        pair = self.tp(SelectableIsAtty(False), SelectableIsAtty(True))
+        self.assertTrue(pair.isatty())
 
-class BufferedRandomTest(unittest.TestCase):
+        pair = self.tp(SelectableIsAtty(True), SelectableIsAtty(True))
+        self.assertTrue(pair.isatty())
 
-    def testReadAndWrite(self):
-        raw = MockRawIO((b"asdf", b"ghjk"))
-        rw = io.BufferedRandom(raw, 8, 12)
+class CBufferedRWPairTest(BufferedRWPairTest):
+    tp = io.BufferedRWPair
+
+class PyBufferedRWPairTest(BufferedRWPairTest):
+    tp = pyio.BufferedRWPair
+
+
+class BufferedRandomTest(BufferedReaderTest, BufferedWriterTest):
+    read_mode = "rb+"
+    write_mode = "wb+"
+
+    def test_constructor(self):
+        BufferedReaderTest.test_constructor(self)
+        BufferedWriterTest.test_constructor(self)
+
+    def test_read_and_write(self):
+        raw = self.MockRawIO((b"asdf", b"ghjk"))
+        rw = self.tp(raw, 8)
 
         self.assertEqual(b"as", rw.read(2))
         rw.write(b"ddd")
         rw.write(b"eee")
         self.assertFalse(raw._write_stack) # Buffer writes
-        self.assertEqual(b"ghjk", rw.read()) # This read forces write flush
+        self.assertEqual(b"ghjk", rw.read())
         self.assertEquals(b"dddeee", raw._write_stack[0])
 
-    def testSeekAndTell(self):
-        raw = io.BytesIO(b"asdfghjkl")
-        rw = io.BufferedRandom(raw)
+    def test_seek_and_tell(self):
+        raw = self.BytesIO(b"asdfghjkl")
+        rw = self.tp(raw)
 
         self.assertEquals(b"as", rw.read(2))
         self.assertEquals(2, rw.tell())
@@ -603,6 +1252,115 @@
         self.assertEquals(b"fl", rw.read(11))
         self.assertRaises(TypeError, rw.seek, 0.0)
 
+    def check_flush_and_read(self, read_func):
+        raw = self.BytesIO(b"abcdefghi")
+        bufio = self.tp(raw)
+
+        self.assertEquals(b"ab", read_func(bufio, 2))
+        bufio.write(b"12")
+        self.assertEquals(b"ef", read_func(bufio, 2))
+        self.assertEquals(6, bufio.tell())
+        bufio.flush()
+        self.assertEquals(6, bufio.tell())
+        self.assertEquals(b"ghi", read_func(bufio))
+        raw.seek(0, 0)
+        raw.write(b"XYZ")
+        # flush() resets the read buffer
+        bufio.flush()
+        bufio.seek(0, 0)
+        self.assertEquals(b"XYZ", read_func(bufio, 3))
+
+    def test_flush_and_read(self):
+        self.check_flush_and_read(lambda bufio, *args: bufio.read(*args))
+
+    def test_flush_and_readinto(self):
+        def _readinto(bufio, n=-1):
+            b = bytearray(n if n >= 0 else 9999)
+            n = bufio.readinto(b)
+            return bytes(b[:n])
+        self.check_flush_and_read(_readinto)
+
+    def test_flush_and_peek(self):
+        def _peek(bufio, n=-1):
+            # This relies on the fact that the buffer can contain the whole
+            # raw stream, otherwise peek() can return less.
+            b = bufio.peek(n)
+            if n != -1:
+                b = b[:n]
+            bufio.seek(len(b), 1)
+            return b
+        self.check_flush_and_read(_peek)
+
+    def test_flush_and_write(self):
+        raw = self.BytesIO(b"abcdefghi")
+        bufio = self.tp(raw)
+
+        bufio.write(b"123")
+        bufio.flush()
+        bufio.write(b"45")
+        bufio.flush()
+        bufio.seek(0, 0)
+        self.assertEquals(b"12345fghi", raw.getvalue())
+        self.assertEquals(b"12345fghi", bufio.read())
+
+    def test_threads(self):
+        BufferedReaderTest.test_threads(self)
+        BufferedWriterTest.test_threads(self)
+
+    def test_writes_and_peek(self):
+        def _peek(bufio):
+            bufio.peek(1)
+        self.check_writes(_peek)
+        def _peek(bufio):
+            pos = bufio.tell()
+            bufio.seek(-1, 1)
+            bufio.peek(1)
+            bufio.seek(pos, 0)
+        self.check_writes(_peek)
+
+    def test_writes_and_reads(self):
+        def _read(bufio):
+            bufio.seek(-1, 1)
+            bufio.read(1)
+        self.check_writes(_read)
+
+    def test_writes_and_read1s(self):
+        def _read1(bufio):
+            bufio.seek(-1, 1)
+            bufio.read1(1)
+        self.check_writes(_read1)
+
+    def test_writes_and_readintos(self):
+        def _read(bufio):
+            bufio.seek(-1, 1)
+            bufio.readinto(bytearray(1))
+        self.check_writes(_read)
+
+    def test_misbehaved_io(self):
+        BufferedReaderTest.test_misbehaved_io(self)
+        BufferedWriterTest.test_misbehaved_io(self)
+
+class CBufferedRandomTest(CBufferedReaderTest, CBufferedWriterTest, BufferedRandomTest):
+    tp = io.BufferedRandom
+
+    def test_constructor(self):
+        BufferedRandomTest.test_constructor(self)
+        # The allocation can succeed on 32-bit builds, e.g. with more
+        # than 2GB RAM and a 64-bit kernel.
+        if sys.maxsize > 0x7FFFFFFF:
+            rawio = self.MockRawIO()
+            bufio = self.tp(rawio)
+            self.assertRaises((OverflowError, MemoryError, ValueError),
+                bufio.__init__, rawio, sys.maxsize)
+
+    def test_garbage_collection(self):
+        CBufferedReaderTest.test_garbage_collection(self)
+        CBufferedWriterTest.test_garbage_collection(self)
+
+class PyBufferedRandomTest(BufferedRandomTest):
+    tp = pyio.BufferedRandom
+
+
 # To fully exercise seek/tell, the StatefulIncrementalDecoder has these
 # properties:
 #   - A single output character can correspond to many bytes of input.
@@ -736,7 +1494,7 @@
          'm--------------.')
     ]
 
-    def testDecoder(self):
+    def test_decoder(self):
         # Try a few one-shot test cases.
         for input, eof, output in self.test_cases:
             d = StatefulIncrementalDecoder()
@@ -752,98 +1510,115 @@
     def setUp(self):
         self.testdata = b"AAA\r\nBBB\rCCC\r\nDDD\nEEE\r\n"
         self.normalized = b"AAA\nBBB\nCCC\nDDD\nEEE\n".decode("ascii")
+        support.unlink(support.TESTFN)
 
     def tearDown(self):
-        test_support.unlink(test_support.TESTFN)
+        support.unlink(support.TESTFN)
 
-    def testLineBuffering(self):
-        r = io.BytesIO()
-        b = io.BufferedWriter(r, 1000)
-        t = io.TextIOWrapper(b, newline="\n", line_buffering=True)
-        t.write(u"X")
+    def test_constructor(self):
+        r = self.BytesIO(b"\xc3\xa9\n\n")
+        b = self.BufferedReader(r, 1000)
+        t = self.TextIOWrapper(b)
+        t.__init__(b, encoding="latin1", newline="\r\n")
+        self.assertEquals(t.encoding, "latin1")
+        self.assertEquals(t.line_buffering, False)
+        t.__init__(b, encoding="utf8", line_buffering=True)
+        self.assertEquals(t.encoding, "utf8")
+        self.assertEquals(t.line_buffering, True)
+        self.assertEquals("\xe9\n", t.readline())
+        self.assertRaises(TypeError, t.__init__, b, newline=42)
+        self.assertRaises(ValueError, t.__init__, b, newline='xyzzy')
+
+    def test_detach(self):
+        r = self.BytesIO()
+        b = self.BufferedWriter(r)
+        t = self.TextIOWrapper(b)
+        self.assertIs(t.detach(), b)
+
+        t = self.TextIOWrapper(b, encoding="ascii")
+        t.write("howdy")
+        self.assertFalse(r.getvalue())
+        t.detach()
+        self.assertEqual(r.getvalue(), b"howdy")
+        self.assertRaises(ValueError, t.detach)
+
+    def test_repr(self):
+        raw = self.BytesIO("hello".encode("utf-8"))
+        b = self.BufferedReader(raw)
+        t = self.TextIOWrapper(b, encoding="utf-8")
+        modname = self.TextIOWrapper.__module__
+        self.assertEqual(repr(t),
+                         "<%s.TextIOWrapper encoding='utf-8'>" % modname)
+        raw.name = "dummy"
+        self.assertEqual(repr(t),
+                         "<%s.TextIOWrapper name=u'dummy' encoding='utf-8'>" % modname)
+        raw.name = b"dummy"
+        self.assertEqual(repr(t),
+                         "<%s.TextIOWrapper name='dummy' encoding='utf-8'>" % modname)
+
+    def test_line_buffering(self):
+        r = self.BytesIO()
+        b = self.BufferedWriter(r, 1000)
+        t = self.TextIOWrapper(b, newline="\n", line_buffering=True)
+        t.write("X")
         self.assertEquals(r.getvalue(), b"")  # No flush happened
-        t.write(u"Y\nZ")
+        t.write("Y\nZ")
         self.assertEquals(r.getvalue(), b"XY\nZ")  # All got flushed
-        t.write(u"A\rB")
+        t.write("A\rB")
         self.assertEquals(r.getvalue(), b"XY\nZA\rB")
 
-    def testEncodingErrorsReading(self):
+    def test_encoding(self):
+        # Check the encoding attribute is always set, and valid
+        b = self.BytesIO()
+        t = self.TextIOWrapper(b, encoding="utf8")
+        self.assertEqual(t.encoding, "utf8")
+        t = self.TextIOWrapper(b)
+        self.assert_(t.encoding is not None)
+        codecs.lookup(t.encoding)
+
+    def test_encoding_errors_reading(self):
         # (1) default
-        b = io.BytesIO(b"abc\n\xff\n")
-        t = io.TextIOWrapper(b, encoding="ascii")
+        b = self.BytesIO(b"abc\n\xff\n")
+        t = self.TextIOWrapper(b, encoding="ascii")
         self.assertRaises(UnicodeError, t.read)
         # (2) explicit strict
-        b = io.BytesIO(b"abc\n\xff\n")
-        t = io.TextIOWrapper(b, encoding="ascii", errors="strict")
+        b = self.BytesIO(b"abc\n\xff\n")
+        t = self.TextIOWrapper(b, encoding="ascii", errors="strict")
         self.assertRaises(UnicodeError, t.read)
         # (3) ignore
-        b = io.BytesIO(b"abc\n\xff\n")
-        t = io.TextIOWrapper(b, encoding="ascii", errors="ignore")
+        b = self.BytesIO(b"abc\n\xff\n")
+        t = self.TextIOWrapper(b, encoding="ascii", errors="ignore")
         self.assertEquals(t.read(), "abc\n\n")
         # (4) replace
-        b = io.BytesIO(b"abc\n\xff\n")
-        t = io.TextIOWrapper(b, encoding="ascii", errors="replace")
-        self.assertEquals(t.read(), u"abc\n\ufffd\n")
+        b = self.BytesIO(b"abc\n\xff\n")
+        t = self.TextIOWrapper(b, encoding="ascii", errors="replace")
+        self.assertEquals(t.read(), "abc\n\ufffd\n")
 
-    def testEncodingErrorsWriting(self):
+    def test_encoding_errors_writing(self):
         # (1) default
-        b = io.BytesIO()
-        t = io.TextIOWrapper(b, encoding="ascii")
-        self.assertRaises(UnicodeError, t.write, u"\xff")
+        b = self.BytesIO()
+        t = self.TextIOWrapper(b, encoding="ascii")
+        self.assertRaises(UnicodeError, t.write, "\xff")
         # (2) explicit strict
-        b = io.BytesIO()
-        t = io.TextIOWrapper(b, encoding="ascii", errors="strict")
-        self.assertRaises(UnicodeError, t.write, u"\xff")
+        b = self.BytesIO()
+        t = self.TextIOWrapper(b, encoding="ascii", errors="strict")
+        self.assertRaises(UnicodeError, t.write, "\xff")
         # (3) ignore
-        b = io.BytesIO()
-        t = io.TextIOWrapper(b, encoding="ascii", errors="ignore",
+        b = self.BytesIO()
+        t = self.TextIOWrapper(b, encoding="ascii", errors="ignore",
                              newline="\n")
-        t.write(u"abc\xffdef\n")
+        t.write("abc\xffdef\n")
         t.flush()
         self.assertEquals(b.getvalue(), b"abcdef\n")
         # (4) replace
-        b = io.BytesIO()
-        t = io.TextIOWrapper(b, encoding="ascii", errors="replace",
+        b = self.BytesIO()
+        t = self.TextIOWrapper(b, encoding="ascii", errors="replace",
                              newline="\n")
-        t.write(u"abc\xffdef\n")
+        t.write("abc\xffdef\n")
         t.flush()
         self.assertEquals(b.getvalue(), b"abc?def\n")
 
-    def testNewlinesInput(self):
-        testdata = b"AAA\nBBB\nCCC\rDDD\rEEE\r\nFFF\r\nGGG"
-        normalized = testdata.replace(b"\r\n", b"\n").replace(b"\r", b"\n")
-        for newline, expected in [
-            (None, normalized.decode("ascii").splitlines(True)),
-            ("", testdata.decode("ascii").splitlines(True)),
-            ("\n", ["AAA\n", "BBB\n", "CCC\rDDD\rEEE\r\n", "FFF\r\n", "GGG"]),
-            ("\r\n", ["AAA\nBBB\nCCC\rDDD\rEEE\r\n", "FFF\r\n", "GGG"]),
-            ("\r",  ["AAA\nBBB\nCCC\r", "DDD\r", "EEE\r", "\nFFF\r", "\nGGG"]),
-            ]:
-            buf = io.BytesIO(testdata)
-            txt = io.TextIOWrapper(buf, encoding="ascii", newline=newline)
-            self.assertEquals(txt.readlines(), expected)
-            txt.seek(0)
-            self.assertEquals(txt.read(), "".join(expected))
-
-    def testNewlinesOutput(self):
-        testdict = {
-            "": b"AAA\nBBB\nCCC\nX\rY\r\nZ",
-            "\n": b"AAA\nBBB\nCCC\nX\rY\r\nZ",
-            "\r": b"AAA\rBBB\rCCC\rX\rY\r\rZ",
-            "\r\n": b"AAA\r\nBBB\r\nCCC\r\nX\rY\r\r\nZ",
-            }
-        tests = [(None, testdict[os.linesep])] + sorted(testdict.items())
-        for newline, expected in tests:
-            buf = io.BytesIO()
-            txt = io.TextIOWrapper(buf, encoding="ascii", newline=newline)
-            txt.write("AAA\nB")
-            txt.write("BB\nCCC\n")
-            txt.write("X\rY\r\nZ")
-            txt.flush()
-            self.assertEquals(buf.closed, False)
-            self.assertEquals(buf.getvalue(), expected)
-
-    def testNewlines(self):
+    def test_newlines(self):
         input_lines = [ "unix\n", "windows\r\n", "os9\r", "last\n", "nonl" ]
 
         tests = [
@@ -867,8 +1642,8 @@
             for do_reads in (False, True):
                 for bufsize in range(1, 10):
                     for newline, exp_lines in tests:
-                        bufio = io.BufferedReader(io.BytesIO(data), bufsize)
-                        textio = io.TextIOWrapper(bufio, newline=newline,
+                        bufio = self.BufferedReader(self.BytesIO(data), bufsize)
+                        textio = self.TextIOWrapper(bufio, newline=newline,
                                                   encoding=encoding)
                         if do_reads:
                             got_lines = []
@@ -885,75 +1660,117 @@
                             self.assertEquals(got_line, exp_line)
                         self.assertEquals(len(got_lines), len(exp_lines))
 
-    def testNewlinesInput(self):
-        testdata = b"AAA\nBBB\nCCC\rDDD\rEEE\r\nFFF\r\nGGG"
+    def test_newlines_input(self):
+        testdata = b"AAA\nBB\x00B\nCCC\rDDD\rEEE\r\nFFF\r\nGGG"
         normalized = testdata.replace(b"\r\n", b"\n").replace(b"\r", b"\n")
         for newline, expected in [
             (None, normalized.decode("ascii").splitlines(True)),
             ("", testdata.decode("ascii").splitlines(True)),
-            ("\n", ["AAA\n", "BBB\n", "CCC\rDDD\rEEE\r\n", "FFF\r\n", "GGG"]),
-            ("\r\n", ["AAA\nBBB\nCCC\rDDD\rEEE\r\n", "FFF\r\n", "GGG"]),
-            ("\r",  ["AAA\nBBB\nCCC\r", "DDD\r", "EEE\r", "\nFFF\r", "\nGGG"]),
+            ("\n", ["AAA\n", "BB\x00B\n", "CCC\rDDD\rEEE\r\n", "FFF\r\n", "GGG"]),
+            ("\r\n", ["AAA\nBB\x00B\nCCC\rDDD\rEEE\r\n", "FFF\r\n", "GGG"]),
+            ("\r",  ["AAA\nBB\x00B\nCCC\r", "DDD\r", "EEE\r", "\nFFF\r", "\nGGG"]),
             ]:
-            buf = io.BytesIO(testdata)
-            txt = io.TextIOWrapper(buf, encoding="ascii", newline=newline)
+            buf = self.BytesIO(testdata)
+            txt = self.TextIOWrapper(buf, encoding="ascii", newline=newline)
             self.assertEquals(txt.readlines(), expected)
             txt.seek(0)
             self.assertEquals(txt.read(), "".join(expected))
 
-    def testNewlinesOutput(self):
-        data = u"AAA\nBBB\rCCC\n"
-        data_lf = b"AAA\nBBB\rCCC\n"
-        data_cr = b"AAA\rBBB\rCCC\r"
-        data_crlf = b"AAA\r\nBBB\rCCC\r\n"
-        save_linesep = os.linesep
-        try:
-            for os.linesep, newline, expected in [
-                ("\n", None, data_lf),
-                ("\r\n", None, data_crlf),
-                ("\n", "", data_lf),
-                ("\r\n", "", data_lf),
-                ("\n", "\n", data_lf),
-                ("\r\n", "\n", data_lf),
-                ("\n", "\r", data_cr),
-                ("\r\n", "\r", data_cr),
-                ("\n", "\r\n", data_crlf),
-                ("\r\n", "\r\n", data_crlf),
-                ]:
-                buf = io.BytesIO()
-                txt = io.TextIOWrapper(buf, encoding="ascii", newline=newline)
-                txt.write(data)
-                txt.close()
-                self.assertEquals(buf.closed, True)
-                self.assertRaises(ValueError, buf.getvalue)
-        finally:
-            os.linesep = save_linesep
+    def test_newlines_output(self):
+        testdict = {
+            "": b"AAA\nBBB\nCCC\nX\rY\r\nZ",
+            "\n": b"AAA\nBBB\nCCC\nX\rY\r\nZ",
+            "\r": b"AAA\rBBB\rCCC\rX\rY\r\rZ",
+            "\r\n": b"AAA\r\nBBB\r\nCCC\r\nX\rY\r\r\nZ",
+            }
+        tests = [(None, testdict[os.linesep])] + sorted(testdict.items())
+        for newline, expected in tests:
+            buf = self.BytesIO()
+            txt = self.TextIOWrapper(buf, encoding="ascii", newline=newline)
+            txt.write("AAA\nB")
+            txt.write("BB\nCCC\n")
+            txt.write("X\rY\r\nZ")
+            txt.flush()
+            self.assertEquals(buf.closed, False)
+            self.assertEquals(buf.getvalue(), expected)
+
+    def test_destructor(self):
+        l = []
+        base = self.BytesIO
+        class MyBytesIO(base):
+            def close(self):
+                l.append(self.getvalue())
+                base.close(self)
+        b = MyBytesIO()
+        t = self.TextIOWrapper(b, encoding="ascii")
+        t.write("abc")
+        del t
+        support.gc_collect()
+        self.assertEquals([b"abc"], l)
+
+    def test_override_destructor(self):
+        record = []
+        class MyTextIO(self.TextIOWrapper):
+            def __del__(self):
+                record.append(1)
+                try:
+                    f = super(MyTextIO, self).__del__
+                except AttributeError:
+                    pass
+                else:
+                    f()
+            def close(self):
+                record.append(2)
+                super(MyTextIO, self).close()
+            def flush(self):
+                record.append(3)
+                super(MyTextIO, self).flush()
+        b = self.BytesIO()
+        t = MyTextIO(b, encoding="ascii")
+        del t
+        support.gc_collect()
+        self.assertEqual(record, [1, 2, 3])
+
+    def test_error_through_destructor(self):
+        # Test that the exception state is not modified by a destructor,
+        # even if close() fails.
+        rawio = self.CloseFailureIO()
+        def f():
+            self.TextIOWrapper(rawio).xyzzy
+        with support.captured_output("stderr") as s:
+            self.assertRaises(AttributeError, f)
+        s = s.getvalue().strip()
+        if s:
+            # The destructor *may* have printed an unraisable error, check it
+            self.assertEqual(len(s.splitlines()), 1)
+            self.assert_(s.startswith("Exception IOError: "), s)
+            self.assert_(s.endswith(" ignored"), s)
 
     # Systematic tests of the text I/O API
 
-    def testBasicIO(self):
+    def test_basic_io(self):
         for chunksize in (1, 2, 3, 4, 5, 15, 16, 17, 31, 32, 33, 63, 64, 65):
             for enc in "ascii", "latin1", "utf8" :# , "utf-16-be", "utf-16-le":
-                f = io.open(test_support.TESTFN, "w+", encoding=enc)
+                f = self.open(support.TESTFN, "w+", encoding=enc)
                 f._CHUNK_SIZE = chunksize
-                self.assertEquals(f.write(u"abc"), 3)
+                self.assertEquals(f.write("abc"), 3)
                 f.close()
-                f = io.open(test_support.TESTFN, "r+", encoding=enc)
+                f = self.open(support.TESTFN, "r+", encoding=enc)
                 f._CHUNK_SIZE = chunksize
                 self.assertEquals(f.tell(), 0)
-                self.assertEquals(f.read(), u"abc")
+                self.assertEquals(f.read(), "abc")
                 cookie = f.tell()
                 self.assertEquals(f.seek(0), 0)
-                self.assertEquals(f.read(2), u"ab")
-                self.assertEquals(f.read(1), u"c")
-                self.assertEquals(f.read(1), u"")
-                self.assertEquals(f.read(), u"")
+                self.assertEquals(f.read(2), "ab")
+                self.assertEquals(f.read(1), "c")
+                self.assertEquals(f.read(1), "")
+                self.assertEquals(f.read(), "")
                 self.assertEquals(f.tell(), cookie)
                 self.assertEquals(f.seek(0), 0)
                 self.assertEquals(f.seek(0, 2), cookie)
-                self.assertEquals(f.write(u"def"), 3)
+                self.assertEquals(f.write("def"), 3)
                 self.assertEquals(f.seek(cookie), cookie)
-                self.assertEquals(f.read(), u"def")
+                self.assertEquals(f.read(), "def")
                 if enc.startswith("utf"):
                     self.multi_line_test(f, enc)
                 f.close()
@@ -961,13 +1778,13 @@
     def multi_line_test(self, f, enc):
         f.seek(0)
         f.truncate()
-        sample = u"s\xff\u0fff\uffff"
+        sample = "s\xff\u0fff\uffff"
         wlines = []
         for size in (0, 1, 2, 3, 4, 5, 30, 31, 32, 33, 62, 63, 64, 65, 1000):
             chars = []
             for i in range(size):
                 chars.append(sample[i % len(sample)])
-            line = u"".join(chars) + u"\n"
+            line = "".join(chars) + "\n"
             wlines.append((f.tell(), line))
             f.write(line)
         f.seek(0)
@@ -980,28 +1797,28 @@
             rlines.append((pos, line))
         self.assertEquals(rlines, wlines)
 
-    def testTelling(self):
-        f = io.open(test_support.TESTFN, "w+", encoding="utf8")
+    def test_telling(self):
+        f = self.open(support.TESTFN, "w+", encoding="utf8")
         p0 = f.tell()
-        f.write(u"\xff\n")
+        f.write("\xff\n")
         p1 = f.tell()
-        f.write(u"\xff\n")
+        f.write("\xff\n")
         p2 = f.tell()
         f.seek(0)
         self.assertEquals(f.tell(), p0)
-        self.assertEquals(f.readline(), u"\xff\n")
+        self.assertEquals(f.readline(), "\xff\n")
         self.assertEquals(f.tell(), p1)
-        self.assertEquals(f.readline(), u"\xff\n")
+        self.assertEquals(f.readline(), "\xff\n")
         self.assertEquals(f.tell(), p2)
         f.seek(0)
         for line in f:
-            self.assertEquals(line, u"\xff\n")
+            self.assertEquals(line, "\xff\n")
             self.assertRaises(IOError, f.tell)
         self.assertEquals(f.tell(), p2)
         f.close()
 
-    def testSeeking(self):
-        chunk_size = io.TextIOWrapper._CHUNK_SIZE
+    def test_seeking(self):
+        chunk_size = _default_chunk_size()
         prefix_size = chunk_size - 2
         u_prefix = "a" * prefix_size
         prefix = bytes(u_prefix.encode("utf-8"))
@@ -1009,43 +1826,46 @@
         u_suffix = "\u8888\n"
         suffix = bytes(u_suffix.encode("utf-8"))
         line = prefix + suffix
-        f = io.open(test_support.TESTFN, "wb")
+        f = self.open(support.TESTFN, "wb")
         f.write(line*2)
         f.close()
-        f = io.open(test_support.TESTFN, "r", encoding="utf-8")
+        f = self.open(support.TESTFN, "r", encoding="utf-8")
         s = f.read(prefix_size)
-        self.assertEquals(s, unicode(prefix, "ascii"))
+        self.assertEquals(s, prefix.decode("ascii"))
         self.assertEquals(f.tell(), prefix_size)
         self.assertEquals(f.readline(), u_suffix)
 
-    def testSeekingToo(self):
+    def test_seeking_too(self):
         # Regression test for a specific bug
         data = b'\xe0\xbf\xbf\n'
-        f = io.open(test_support.TESTFN, "wb")
+        f = self.open(support.TESTFN, "wb")
         f.write(data)
         f.close()
-        f = io.open(test_support.TESTFN, "r", encoding="utf-8")
+        f = self.open(support.TESTFN, "r", encoding="utf-8")
         f._CHUNK_SIZE  # Just test that it exists
         f._CHUNK_SIZE = 2
         f.readline()
         f.tell()
 
-    def testSeekAndTell(self):
-        """Test seek/tell using the StatefulIncrementalDecoder."""
+    def test_seek_and_tell(self):
+        #Test seek/tell using the StatefulIncrementalDecoder.
+        # Make test faster by doing smaller seeks
+        CHUNK_SIZE = 128
 
-        def testSeekAndTellWithData(data, min_pos=0):
+        def test_seek_and_tell_with_data(data, min_pos=0):
             """Tell/seek to various points within a data stream and ensure
             that the decoded data returned by read() is consistent."""
-            f = io.open(test_support.TESTFN, 'wb')
+            f = self.open(support.TESTFN, 'wb')
             f.write(data)
             f.close()
-            f = io.open(test_support.TESTFN, encoding='test_decoder')
+            f = self.open(support.TESTFN, encoding='test_decoder')
+            f._CHUNK_SIZE = CHUNK_SIZE
             decoded = f.read()
             f.close()
 
             for i in range(min_pos, len(decoded) + 1): # seek positions
                 for j in [1, 5, len(decoded) - i]: # read lengths
-                    f = io.open(test_support.TESTFN, encoding='test_decoder')
+                    f = self.open(support.TESTFN, encoding='test_decoder')
                     self.assertEquals(f.read(i), decoded[:i])
                     cookie = f.tell()
                     self.assertEquals(f.read(j), decoded[i:i + j])
@@ -1060,23 +1880,22 @@
         try:
             # Try each test case.
             for input, _, _ in StatefulIncrementalDecoderTest.test_cases:
-                testSeekAndTellWithData(input)
+                test_seek_and_tell_with_data(input)
 
             # Position each test case so that it crosses a chunk boundary.
-            CHUNK_SIZE = io.TextIOWrapper._CHUNK_SIZE
             for input, _, _ in StatefulIncrementalDecoderTest.test_cases:
                 offset = CHUNK_SIZE - len(input)//2
                 prefix = b'.'*offset
                 # Don't bother seeking into the prefix (takes too long).
                 min_pos = offset*2
-                testSeekAndTellWithData(prefix + input, min_pos)
+                test_seek_and_tell_with_data(prefix + input, min_pos)
 
         # Ensure our test decoder won't interfere with subsequent tests.
         finally:
             StatefulIncrementalDecoder.codecEnabled = 0
 
-    def testEncodedWrites(self):
-        data = u"1234567890"
+    def test_encoded_writes(self):
+        data = "1234567890"
         tests = ("utf-16",
                  "utf-16-le",
                  "utf-16-be",
@@ -1084,54 +1903,26 @@
                  "utf-32-le",
                  "utf-32-be")
         for encoding in tests:
-            buf = io.BytesIO()
-            f = io.TextIOWrapper(buf, encoding=encoding)
+            buf = self.BytesIO()
+            f = self.TextIOWrapper(buf, encoding=encoding)
             # Check if the BOM is written only once (see issue1753).
             f.write(data)
             f.write(data)
             f.seek(0)
             self.assertEquals(f.read(), data * 2)
+            f.seek(0)
+            self.assertEquals(f.read(), data * 2)
             self.assertEquals(buf.getvalue(), (data * 2).encode(encoding))
 
-    def timingTest(self):
-        timer = time.time
-        enc = "utf8"
-        line = "\0\x0f\xff\u0fff\uffff\U000fffff\U0010ffff"*3 + "\n"
-        nlines = 10000
-        nchars = len(line)
-        nbytes = len(line.encode(enc))
-        for chunk_size in (32, 64, 128, 256):
-            f = io.open(test_support.TESTFN, "w+", encoding=enc)
-            f._CHUNK_SIZE = chunk_size
-            t0 = timer()
-            for i in range(nlines):
-                f.write(line)
-            f.flush()
-            t1 = timer()
-            f.seek(0)
-            for line in f:
-                pass
-            t2 = timer()
-            f.seek(0)
-            while f.readline():
-                pass
-            t3 = timer()
-            f.seek(0)
-            while f.readline():
-                f.tell()
-            t4 = timer()
-            f.close()
-            if test_support.verbose:
-                print("\nTiming test: %d lines of %d characters (%d bytes)" %
-                      (nlines, nchars, nbytes))
-                print("File chunk size:          %6s" % f._CHUNK_SIZE)
-                print("Writing:                  %6.3f seconds" % (t1-t0))
-                print("Reading using iteration:  %6.3f seconds" % (t2-t1))
-                print("Reading using readline(): %6.3f seconds" % (t3-t2))
-                print("Using readline()+tell():  %6.3f seconds" % (t4-t3))
+    def test_unreadable(self):
+        class UnReadable(self.BytesIO):
+            def readable(self):
+                return False
+        txt = self.TextIOWrapper(UnReadable())
+        self.assertRaises(IOError, txt.read)
 
-    def testReadOneByOne(self):
-        txt = io.TextIOWrapper(io.BytesIO(b"AA\r\nBB"))
+    def test_read_one_by_one(self):
+        txt = self.TextIOWrapper(self.BytesIO(b"AA\r\nBB"))
         reads = ""
         while True:
             c = txt.read(1)
@@ -1141,9 +1932,9 @@
         self.assertEquals(reads, "AA\nBB")
 
     # read in amounts equal to TextIOWrapper._CHUNK_SIZE which is 128.
-    def testReadByChunk(self):
+    def test_read_by_chunk(self):
         # make sure "\r\n" straddles 128 char boundary.
-        txt = io.TextIOWrapper(io.BytesIO(b"A" * 127 + b"\r\nB"))
+        txt = self.TextIOWrapper(self.BytesIO(b"A" * 127 + b"\r\nB"))
         reads = ""
         while True:
             c = txt.read(128)
@@ -1153,7 +1944,7 @@
         self.assertEquals(reads, "A"*127+"\nB")
 
     def test_issue1395_1(self):
-        txt = io.TextIOWrapper(io.BytesIO(self.testdata), encoding="ascii")
+        txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
 
         # read one char at a time
         reads = ""
@@ -1165,7 +1956,7 @@
         self.assertEquals(reads, self.normalized)
 
     def test_issue1395_2(self):
-        txt = io.TextIOWrapper(io.BytesIO(self.testdata), encoding="ascii")
+        txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
         txt._CHUNK_SIZE = 4
 
         reads = ""
@@ -1177,7 +1968,7 @@
         self.assertEquals(reads, self.normalized)
 
     def test_issue1395_3(self):
-        txt = io.TextIOWrapper(io.BytesIO(self.testdata), encoding="ascii")
+        txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
         txt._CHUNK_SIZE = 4
 
         reads = txt.read(4)
@@ -1188,7 +1979,7 @@
         self.assertEquals(reads, self.normalized)
 
     def test_issue1395_4(self):
-        txt = io.TextIOWrapper(io.BytesIO(self.testdata), encoding="ascii")
+        txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
         txt._CHUNK_SIZE = 4
 
         reads = txt.read(4)
@@ -1196,7 +1987,7 @@
         self.assertEquals(reads, self.normalized)
 
     def test_issue1395_5(self):
-        txt = io.TextIOWrapper(io.BytesIO(self.testdata), encoding="ascii")
+        txt = self.TextIOWrapper(self.BytesIO(self.testdata), encoding="ascii")
         txt._CHUNK_SIZE = 4
 
         reads = txt.read(4)
@@ -1206,12 +1997,84 @@
         self.assertEquals(txt.read(4), "BBB\n")
 
     def test_issue2282(self):
-        buffer = io.BytesIO(self.testdata)
-        txt = io.TextIOWrapper(buffer, encoding="ascii")
+        buffer = self.BytesIO(self.testdata)
+        txt = self.TextIOWrapper(buffer, encoding="ascii")
 
         self.assertEqual(buffer.seekable(), txt.seekable())
 
-    def check_newline_decoder_utf8(self, decoder):
+    @unittest.skip("Issue #6213 with incremental encoders")
+    def test_append_bom(self):
+        # The BOM is not written again when appending to a non-empty file
+        filename = support.TESTFN
+        for charset in ('utf-8-sig', 'utf-16', 'utf-32'):
+            with self.open(filename, 'w', encoding=charset) as f:
+                f.write('aaa')
+                pos = f.tell()
+            with self.open(filename, 'rb') as f:
+                self.assertEquals(f.read(), 'aaa'.encode(charset))
+
+            with self.open(filename, 'a', encoding=charset) as f:
+                f.write('xxx')
+            with self.open(filename, 'rb') as f:
+                self.assertEquals(f.read(), 'aaaxxx'.encode(charset))
+
+    @unittest.skip("Issue #6213 with incremental encoders")
+    def test_seek_bom(self):
+        # Same test, but when seeking manually
+        filename = support.TESTFN
+        for charset in ('utf-8-sig', 'utf-16', 'utf-32'):
+            with self.open(filename, 'w', encoding=charset) as f:
+                f.write('aaa')
+                pos = f.tell()
+            with self.open(filename, 'r+', encoding=charset) as f:
+                f.seek(pos)
+                f.write('zzz')
+                f.seek(0)
+                f.write('bbb')
+            with self.open(filename, 'rb') as f:
+                self.assertEquals(f.read(), 'bbbzzz'.encode(charset))
+
+    def test_errors_property(self):
+        with self.open(support.TESTFN, "w") as f:
+            self.assertEqual(f.errors, "strict")
+        with self.open(support.TESTFN, "w", errors="replace") as f:
+            self.assertEqual(f.errors, "replace")
+
+
+class CTextIOWrapperTest(TextIOWrapperTest):
+
+    def test_initialization(self):
+        r = self.BytesIO(b"\xc3\xa9\n\n")
+        b = self.BufferedReader(r, 1000)
+        t = self.TextIOWrapper(b)
+        self.assertRaises(TypeError, t.__init__, b, newline=42)
+        self.assertRaises(ValueError, t.read)
+        self.assertRaises(ValueError, t.__init__, b, newline='xyzzy')
+        self.assertRaises(ValueError, t.read)
+
+    def test_garbage_collection(self):
+        # C TextIOWrapper objects are collected, and collecting them flushes
+        # all data to disk.
+        # The Python version has __del__, so it ends in gc.garbage instead.
+        rawio = io.FileIO(support.TESTFN, "wb")
+        b = self.BufferedWriter(rawio)
+        t = self.TextIOWrapper(b, encoding="ascii")
+        t.write("456def")
+        t.x = t
+        wr = weakref.ref(t)
+        del t
+        support.gc_collect()
+        self.assert_(wr() is None, wr)
+        with self.open(support.TESTFN, "rb") as f:
+            self.assertEqual(f.read(), b"456def")
+
+class PyTextIOWrapperTest(TextIOWrapperTest):
+    pass
+
+
+class IncrementalNewlineDecoderTest(unittest.TestCase):
+
+    def check_newline_decoding_utf8(self, decoder):
         # UTF-8 specific tests for a newline decoder
         def _check_decode(b, s, **kwargs):
             # We exercise getstate() / setstate() as well as decode()
@@ -1253,12 +2116,20 @@
         _check_decode(b'\xe8\xa2\x88\r', "\u8888")
         _check_decode(b'\n', "\n")
 
-    def check_newline_decoder(self, decoder, encoding):
+    def check_newline_decoding(self, decoder, encoding):
         result = []
-        encoder = codecs.getincrementalencoder(encoding)()
-        def _decode_bytewise(s):
-            for b in encoder.encode(s):
-                result.append(decoder.decode(b))
+        if encoding is not None:
+            encoder = codecs.getincrementalencoder(encoding)()
+            def _decode_bytewise(s):
+                # Decode one byte at a time
+                for b in encoder.encode(s):
+                    result.append(decoder.decode(b))
+        else:
+            encoder = None
+            def _decode_bytewise(s):
+                # Decode one char at a time
+                for c in s:
+                    result.append(decoder.decode(c))
         self.assertEquals(decoder.newlines, None)
         _decode_bytewise("abc\n\r")
         self.assertEquals(decoder.newlines, '\n')
@@ -1271,22 +2142,47 @@
         _decode_bytewise("abc\r")
         self.assertEquals("".join(result), "abc\n\nabcabc\nabcabc")
         decoder.reset()
-        self.assertEquals(decoder.decode("abc".encode(encoding)), "abc")
+        input = "abc"
+        if encoder is not None:
+            encoder.reset()
+            input = encoder.encode(input)
+        self.assertEquals(decoder.decode(input), "abc")
         self.assertEquals(decoder.newlines, None)
 
     def test_newline_decoder(self):
         encodings = (
-            'utf-8', 'latin-1',
+            # None meaning the IncrementalNewlineDecoder takes unicode input
+            # rather than bytes input
+            None, 'utf-8', 'latin-1',
             'utf-16', 'utf-16-le', 'utf-16-be',
             'utf-32', 'utf-32-le', 'utf-32-be',
         )
         for enc in encodings:
-            decoder = codecs.getincrementaldecoder(enc)()
-            decoder = io.IncrementalNewlineDecoder(decoder, translate=True)
-            self.check_newline_decoder(decoder, enc)
+            decoder = enc and codecs.getincrementaldecoder(enc)()
+            decoder = self.IncrementalNewlineDecoder(decoder, translate=True)
+            self.check_newline_decoding(decoder, enc)
         decoder = codecs.getincrementaldecoder("utf-8")()
-        decoder = io.IncrementalNewlineDecoder(decoder, translate=True)
-        self.check_newline_decoder_utf8(decoder)
+        decoder = self.IncrementalNewlineDecoder(decoder, translate=True)
+        self.check_newline_decoding_utf8(decoder)
+
+    def test_newline_bytes(self):
+        # Issue 5433: Excessive optimization in IncrementalNewlineDecoder
+        def _check(dec):
+            self.assertEquals(dec.newlines, None)
+            self.assertEquals(dec.decode("\u0D00"), "\u0D00")
+            self.assertEquals(dec.newlines, None)
+            self.assertEquals(dec.decode("\u0A00"), "\u0A00")
+            self.assertEquals(dec.newlines, None)
+        dec = self.IncrementalNewlineDecoder(None, translate=False)
+        _check(dec)
+        dec = self.IncrementalNewlineDecoder(None, translate=True)
+        _check(dec)
+
+class CIncrementalNewlineDecoderTest(IncrementalNewlineDecoderTest):
+    pass
+
+class PyIncrementalNewlineDecoderTest(IncrementalNewlineDecoderTest):
+    pass
 
 
 # XXX Tests for open()
@@ -1294,40 +2190,39 @@
 class MiscIOTest(unittest.TestCase):
 
     def tearDown(self):
-        test_support.unlink(test_support.TESTFN)
+        support.unlink(support.TESTFN)
 
-    def testImport__all__(self):
-        for name in io.__all__:
-            obj = getattr(io, name, None)
+    def test___all__(self):
+        for name in self.io.__all__:
+            obj = getattr(self.io, name, None)
             self.assertTrue(obj is not None, name)
             if name == "open":
                 continue
-            elif "error" in name.lower():
+            elif "error" in name.lower() or name == "UnsupportedOperation":
                 self.assertTrue(issubclass(obj, Exception), name)
             elif not name.startswith("SEEK_"):
-                self.assertTrue(issubclass(obj, io.IOBase))
-
+                self.assertTrue(issubclass(obj, self.IOBase))
 
     def test_attributes(self):
-        f = io.open(test_support.TESTFN, "wb", buffering=0)
+        f = self.open(support.TESTFN, "wb", buffering=0)
         self.assertEquals(f.mode, "wb")
         f.close()
 
-        f = io.open(test_support.TESTFN, "U")
-        self.assertEquals(f.name,            test_support.TESTFN)
-        self.assertEquals(f.buffer.name,     test_support.TESTFN)
-        self.assertEquals(f.buffer.raw.name, test_support.TESTFN)
+        f = self.open(support.TESTFN, "U")
+        self.assertEquals(f.name,            support.TESTFN)
+        self.assertEquals(f.buffer.name,     support.TESTFN)
+        self.assertEquals(f.buffer.raw.name, support.TESTFN)
         self.assertEquals(f.mode,            "U")
         self.assertEquals(f.buffer.mode,     "rb")
         self.assertEquals(f.buffer.raw.mode, "rb")
         f.close()
 
-        f = io.open(test_support.TESTFN, "w+")
+        f = self.open(support.TESTFN, "w+")
         self.assertEquals(f.mode,            "w+")
         self.assertEquals(f.buffer.mode,     "rb+") # Does it really matter?
         self.assertEquals(f.buffer.raw.mode, "rb+")
 
-        g = io.open(f.fileno(), "wb", closefd=False)
+        g = self.open(f.fileno(), "wb", closefd=False)
         self.assertEquals(g.mode,     "wb")
         self.assertEquals(g.raw.mode, "wb")
         self.assertEquals(g.name,     f.fileno())
@@ -1335,13 +2230,138 @@
         f.close()
         g.close()
 
+    def test_io_after_close(self):
+        for kwargs in [
+                {"mode": "w"},
+                {"mode": "wb"},
+                {"mode": "w", "buffering": 1},
+                {"mode": "w", "buffering": 2},
+                {"mode": "wb", "buffering": 0},
+                {"mode": "r"},
+                {"mode": "rb"},
+                {"mode": "r", "buffering": 1},
+                {"mode": "r", "buffering": 2},
+                {"mode": "rb", "buffering": 0},
+                {"mode": "w+"},
+                {"mode": "w+b"},
+                {"mode": "w+", "buffering": 1},
+                {"mode": "w+", "buffering": 2},
+                {"mode": "w+b", "buffering": 0},
+            ]:
+            f = self.open(support.TESTFN, **kwargs)
+            f.close()
+            self.assertRaises(ValueError, f.flush)
+            self.assertRaises(ValueError, f.fileno)
+            self.assertRaises(ValueError, f.isatty)
+            self.assertRaises(ValueError, f.__iter__)
+            if hasattr(f, "peek"):
+                self.assertRaises(ValueError, f.peek, 1)
+            self.assertRaises(ValueError, f.read)
+            if hasattr(f, "read1"):
+                self.assertRaises(ValueError, f.read1, 1024)
+            if hasattr(f, "readinto"):
+                self.assertRaises(ValueError, f.readinto, bytearray(1024))
+            self.assertRaises(ValueError, f.readline)
+            self.assertRaises(ValueError, f.readlines)
+            self.assertRaises(ValueError, f.seek, 0)
+            self.assertRaises(ValueError, f.tell)
+            self.assertRaises(ValueError, f.truncate)
+            self.assertRaises(ValueError, f.write,
+                              b"" if "b" in kwargs['mode'] else "")
+            self.assertRaises(ValueError, f.writelines, [])
+            self.assertRaises(ValueError, next, f)
+
+    def test_blockingioerror(self):
+        # Various BlockingIOError issues
+        self.assertRaises(TypeError, self.BlockingIOError)
+        self.assertRaises(TypeError, self.BlockingIOError, 1)
+        self.assertRaises(TypeError, self.BlockingIOError, 1, 2, 3, 4)
+        self.assertRaises(TypeError, self.BlockingIOError, 1, "", None)
+        b = self.BlockingIOError(1, "")
+        self.assertEqual(b.characters_written, 0)
+        class C(unicode):
+            pass
+        c = C("")
+        b = self.BlockingIOError(1, c)
+        c.b = b
+        b.c = c
+        wr = weakref.ref(c)
+        del c, b
+        support.gc_collect()
+        self.assert_(wr() is None, wr)
+
+    def test_abcs(self):
+        # Test the visible base classes are ABCs.
+        self.assertTrue(isinstance(self.IOBase, abc.ABCMeta))
+        self.assertTrue(isinstance(self.RawIOBase, abc.ABCMeta))
+        self.assertTrue(isinstance(self.BufferedIOBase, abc.ABCMeta))
+        self.assertTrue(isinstance(self.TextIOBase, abc.ABCMeta))
+
+    def _check_abc_inheritance(self, abcmodule):
+        with self.open(support.TESTFN, "wb", buffering=0) as f:
+            self.assertTrue(isinstance(f, abcmodule.IOBase))
+            self.assertTrue(isinstance(f, abcmodule.RawIOBase))
+            self.assertFalse(isinstance(f, abcmodule.BufferedIOBase))
+            self.assertFalse(isinstance(f, abcmodule.TextIOBase))
+        with self.open(support.TESTFN, "wb") as f:
+            self.assertTrue(isinstance(f, abcmodule.IOBase))
+            self.assertFalse(isinstance(f, abcmodule.RawIOBase))
+            self.assertTrue(isinstance(f, abcmodule.BufferedIOBase))
+            self.assertFalse(isinstance(f, abcmodule.TextIOBase))
+        with self.open(support.TESTFN, "w") as f:
+            self.assertTrue(isinstance(f, abcmodule.IOBase))
+            self.assertFalse(isinstance(f, abcmodule.RawIOBase))
+            self.assertFalse(isinstance(f, abcmodule.BufferedIOBase))
+            self.assertTrue(isinstance(f, abcmodule.TextIOBase))
+
+    def test_abc_inheritance(self):
+        # Test implementations inherit from their respective ABCs
+        self._check_abc_inheritance(self)
+
+    def test_abc_inheritance_official(self):
+        # Test implementations inherit from the official ABCs of the
+        # baseline "io" module.
+        self._check_abc_inheritance(io)
+
+class CMiscIOTest(MiscIOTest):
+    io = io
+
+class PyMiscIOTest(MiscIOTest):
+    io = pyio
 
 def test_main():
-    test_support.run_unittest(IOTest, BytesIOTest, StringIOTest,
-                              BufferedReaderTest, BufferedWriterTest,
-                              BufferedRWPairTest, BufferedRandomTest,
-                              StatefulIncrementalDecoderTest,
-                              TextIOWrapperTest, MiscIOTest)
+    tests = (CIOTest, PyIOTest,
+             CBufferedReaderTest, PyBufferedReaderTest,
+             CBufferedWriterTest, PyBufferedWriterTest,
+             CBufferedRWPairTest, PyBufferedRWPairTest,
+             CBufferedRandomTest, PyBufferedRandomTest,
+             StatefulIncrementalDecoderTest,
+             CIncrementalNewlineDecoderTest, PyIncrementalNewlineDecoderTest,
+             CTextIOWrapperTest, PyTextIOWrapperTest,
+             CMiscIOTest, PyMiscIOTest,
+             )
+
+    # Put the namespaces of the IO module we are testing and some useful mock
+    # classes in the __dict__ of each test.
+    mocks = (MockRawIO, MisbehavedRawIO, MockFileIO, CloseFailureIO,
+             MockNonBlockWriterIO)
+    all_members = io.__all__ + ["IncrementalNewlineDecoder"]
+    c_io_ns = dict((name, getattr(io, name)) for name in all_members)
+    py_io_ns = dict((name, getattr(pyio, name)) for name in all_members)
+    globs = globals()
+    c_io_ns.update((x.__name__, globs["C" + x.__name__]) for x in mocks)
+    py_io_ns.update((x.__name__, globs["Py" + x.__name__]) for x in mocks)
+    # Avoid turning open into a bound method.
+    py_io_ns["open"] = pyio.OpenWrapper
+    for test in tests:
+        if test.__name__.startswith("C"):
+            for name, obj in c_io_ns.items():
+                setattr(test, name, obj)
+        elif test.__name__.startswith("Py"):
+            for name, obj in py_io_ns.items():
+                setattr(test, name, obj)
+
+    support.run_unittest(*tests)
 
 if __name__ == "__main__":
-    unittest.main()
+    test_main()

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_largefile.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_largefile.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_largefile.py	Sat Jun 20 00:11:15 2009
@@ -1,12 +1,16 @@
 """Test largefile support on system where this makes sense.
 """
 
+from __future__ import print_function
+
 import os
 import stat
 import sys
 import unittest
 from test.test_support import run_unittest, TESTFN, verbose, requires, \
                               unlink
+import io  # C implementation of io
+import _pyio as pyio # Python implementation of io
 
 try:
     import signal
@@ -18,10 +22,10 @@
     pass
 
 # create >2GB file (2GB = 2147483648 bytes)
-size = 2500000000L
+size = 2500000000
 
 
-class TestCase(unittest.TestCase):
+class LargeFileTest(unittest.TestCase):
     """Test that each file function works as expected for a large
     (i.e. > 2GB, do  we have to check > 4GB) files.
 
@@ -33,28 +37,28 @@
 
     def test_seek(self):
         if verbose:
-            print 'create large file via seek (may be sparse file) ...'
-        with open(TESTFN, 'wb') as f:
-            f.write('z')
+            print('create large file via seek (may be sparse file) ...')
+        with self.open(TESTFN, 'wb') as f:
+            f.write(b'z')
             f.seek(0)
             f.seek(size)
-            f.write('a')
+            f.write(b'a')
             f.flush()
             if verbose:
-                print 'check file size with os.fstat'
+                print('check file size with os.fstat')
             self.assertEqual(os.fstat(f.fileno())[stat.ST_SIZE], size+1)
 
     def test_osstat(self):
         if verbose:
-            print 'check file size with os.stat'
+            print('check file size with os.stat')
         self.assertEqual(os.stat(TESTFN)[stat.ST_SIZE], size+1)
 
     def test_seek_read(self):
         if verbose:
-            print 'play around with seek() and read() with the built largefile'
-        with open(TESTFN, 'rb') as f:
+            print('play around with seek() and read() with the built largefile')
+        with self.open(TESTFN, 'rb') as f:
             self.assertEqual(f.tell(), 0)
-            self.assertEqual(f.read(1), 'z')
+            self.assertEqual(f.read(1), b'z')
             self.assertEqual(f.tell(), 1)
             f.seek(0)
             self.assertEqual(f.tell(), 0)
@@ -77,15 +81,15 @@
             f.seek(size)
             self.assertEqual(f.tell(), size)
             # the 'a' that was written at the end of file above
-            self.assertEqual(f.read(1), 'a')
+            self.assertEqual(f.read(1), b'a')
             f.seek(-size-1, 1)
-            self.assertEqual(f.read(1), 'z')
+            self.assertEqual(f.read(1), b'z')
             self.assertEqual(f.tell(), 1)
 
     def test_lseek(self):
         if verbose:
-            print 'play around with os.lseek() with the built largefile'
-        with open(TESTFN, 'rb') as f:
+            print('play around with os.lseek() with the built largefile')
+        with self.open(TESTFN, 'rb') as f:
             self.assertEqual(os.lseek(f.fileno(), 0, 0), 0)
             self.assertEqual(os.lseek(f.fileno(), 42, 0), 42)
             self.assertEqual(os.lseek(f.fileno(), 42, 1), 84)
@@ -95,16 +99,16 @@
             self.assertEqual(os.lseek(f.fileno(), -size-1, 2), 0)
             self.assertEqual(os.lseek(f.fileno(), size, 0), size)
             # the 'a' that was written at the end of file above
-            self.assertEqual(f.read(1), 'a')
+            self.assertEqual(f.read(1), b'a')
 
     def test_truncate(self):
         if verbose:
-            print 'try truncate'
-        with open(TESTFN, 'r+b') as f:
+            print('try truncate')
+        with self.open(TESTFN, 'r+b') as f:
             # this is already decided before start running the test suite
             # but we do it anyway for extra protection
             if not hasattr(f, 'truncate'):
-                raise unittest.SkipTest, "open().truncate() not available on this system"
+                raise unittest.SkipTest("open().truncate() not available on this system")
             f.seek(0, 2)
             # else we've lost track of the true size
             self.assertEqual(f.tell(), size+1)
@@ -120,17 +124,29 @@
             newsize -= 1
             f.seek(42)
             f.truncate(newsize)
-            self.assertEqual(f.tell(), 42)       # else pointer moved
+            if self.new_io:
+                self.assertEqual(f.tell(), newsize)  # else wasn't truncated
             f.seek(0, 2)
-            self.assertEqual(f.tell(), newsize)  # else wasn't truncated
-
+            self.assertEqual(f.tell(), newsize)
             # XXX truncate(larger than true size) is ill-defined
             # across platform; cut it waaaaay back
             f.seek(0)
             f.truncate(1)
-            self.assertEqual(f.tell(), 0)       # else pointer moved
+            if self.new_io:
+                self.assertEqual(f.tell(), 1)       # else pointer moved
+            f.seek(0)
             self.assertEqual(len(f.read()), 1)  # else wasn't truncated
 
+    def test_seekable(self):
+        # Issue #5016; seekable() can return False when the current position
+        # is negative when truncated to an int.
+        if not self.new_io:
+            self.skipTest("builtin file doesn't have seekable()")
+        for pos in (2**31-1, 2**31, 2**31+1):
+            with self.open(TESTFN, 'rb') as f:
+                f.seek(pos)
+                self.assert_(f.seekable())
+
 
 def test_main():
     # On Windows and Mac OSX this test comsumes large resources; It
@@ -144,34 +160,41 @@
         # Only run if the current filesystem supports large files.
         # (Skip this test on Windows, since we now always support
         # large files.)
-        f = open(TESTFN, 'wb')
+        f = open(TESTFN, 'wb', buffering=0)
         try:
             # 2**31 == 2147483648
-            f.seek(2147483649L)
+            f.seek(2147483649)
             # Seeking is not enough of a test: you must write and
             # flush, too!
-            f.write("x")
+            f.write(b'x')
             f.flush()
         except (IOError, OverflowError):
             f.close()
             unlink(TESTFN)
-            raise unittest.SkipTest, "filesystem does not have largefile support"
+            raise unittest.SkipTest("filesystem does not have largefile support")
         else:
             f.close()
     suite = unittest.TestSuite()
-    suite.addTest(TestCase('test_seek'))
-    suite.addTest(TestCase('test_osstat'))
-    suite.addTest(TestCase('test_seek_read'))
-    suite.addTest(TestCase('test_lseek'))
-    with open(TESTFN, 'w') as f:
-        if hasattr(f, 'truncate'):
-            suite.addTest(TestCase('test_truncate'))
-    unlink(TESTFN)
+    for _open, prefix in [(io.open, 'C'), (pyio.open, 'Py'),
+                          (open, 'Builtin')]:
+        class TestCase(LargeFileTest):
+            pass
+        TestCase.open = staticmethod(_open)
+        TestCase.new_io = _open is not open
+        TestCase.__name__ = prefix + LargeFileTest.__name__
+        suite.addTest(TestCase('test_seek'))
+        suite.addTest(TestCase('test_osstat'))
+        suite.addTest(TestCase('test_seek_read'))
+        suite.addTest(TestCase('test_lseek'))
+        with _open(TESTFN, 'wb') as f:
+            if hasattr(f, 'truncate'):
+                suite.addTest(TestCase('test_truncate'))
+        suite.addTest(TestCase('test_seekable'))
+        unlink(TESTFN)
     try:
         run_unittest(suite)
     finally:
         unlink(TESTFN)
 
-
 if __name__ == '__main__':
     test_main()

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_memoryio.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_memoryio.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_memoryio.py	Sat Jun 20 00:11:15 2009
@@ -4,23 +4,66 @@
 """
 
 from __future__ import unicode_literals
+from __future__ import print_function
 
 import unittest
-from test import test_support
+from test import test_support as support
 
 import io
+import _pyio as pyio
 import sys
-import array
 
-try:
-    import _bytesio
-    has_c_implementation = True
-except ImportError:
-    has_c_implementation = False
+class MemorySeekTestMixin:
+
+    def testInit(self):
+        buf = self.buftype("1234567890")
+        bytesIo = self.ioclass(buf)
+
+    def testRead(self):
+        buf = self.buftype("1234567890")
+        bytesIo = self.ioclass(buf)
+
+        self.assertEquals(buf[:1], bytesIo.read(1))
+        self.assertEquals(buf[1:5], bytesIo.read(4))
+        self.assertEquals(buf[5:], bytesIo.read(900))
+        self.assertEquals(self.EOF, bytesIo.read())
+
+    def testReadNoArgs(self):
+        buf = self.buftype("1234567890")
+        bytesIo = self.ioclass(buf)
+
+        self.assertEquals(buf, bytesIo.read())
+        self.assertEquals(self.EOF, bytesIo.read())
+
+    def testSeek(self):
+        buf = self.buftype("1234567890")
+        bytesIo = self.ioclass(buf)
+
+        bytesIo.read(5)
+        bytesIo.seek(0)
+        self.assertEquals(buf, bytesIo.read())
+
+        bytesIo.seek(3)
+        self.assertEquals(buf[3:], bytesIo.read())
+        self.assertRaises(TypeError, bytesIo.seek, 0.0)
+
+    def testTell(self):
+        buf = self.buftype("1234567890")
+        bytesIo = self.ioclass(buf)
+
+        self.assertEquals(0, bytesIo.tell())
+        bytesIo.seek(5)
+        self.assertEquals(5, bytesIo.tell())
+        bytesIo.seek(10000)
+        self.assertEquals(10000, bytesIo.tell())
 
 
 class MemoryTestMixin:
 
+    def test_detach(self):
+        buf = self.ioclass()
+        self.assertRaises(self.UnsupportedOperation, buf.detach)
+
     def write_ops(self, f, t):
         self.assertEqual(f.write(t("blah.")), 5)
         self.assertEqual(f.seek(0), 0)
@@ -151,7 +194,7 @@
         self.assertEqual(memio.readline(), self.EOF)
         memio.seek(0)
         self.assertEqual(type(memio.readline()), type(buf))
-        self.assertEqual(memio.readline(None), buf)
+        self.assertEqual(memio.readline(), buf)
         self.assertRaises(TypeError, memio.readline, '')
         memio.close()
         self.assertRaises(ValueError,  memio.readline)
@@ -197,7 +240,7 @@
         self.assertEqual(i, 10)
         memio = self.ioclass(buf * 2)
         memio.close()
-        self.assertRaises(ValueError, memio.next)
+        self.assertRaises(ValueError, next, memio)
 
     def test_getvalue(self):
         buf = self.buftype("1234567890")
@@ -299,11 +342,14 @@
         self.assertEqual(test2(), buf)
 
 
-class PyBytesIOTest(MemoryTestMixin, unittest.TestCase):
+class PyBytesIOTest(MemoryTestMixin, MemorySeekTestMixin, unittest.TestCase):
+
+    UnsupportedOperation = pyio.UnsupportedOperation
+
     @staticmethod
     def buftype(s):
         return s.encode("ascii")
-    ioclass = io._BytesIO
+    ioclass = pyio.BytesIO
     EOF = b""
 
     def test_read1(self):
@@ -333,7 +379,8 @@
         self.assertEqual(memio.readinto(b), 0)
         self.assertEqual(b, b"")
         self.assertRaises(TypeError, memio.readinto, '')
-        a = array.array(b'b', map(ord, b"hello world"))
+        import array
+        a = array.array(b'b', b"hello world")
         memio = self.ioclass(buf)
         memio.readinto(a)
         self.assertEqual(a.tostring(), b"1234567890d")
@@ -365,19 +412,41 @@
 
     def test_bytes_array(self):
         buf = b"1234567890"
-
-        a = array.array(b'b', map(ord, buf))
+        import array
+        a = array.array(b'b', buf)
         memio = self.ioclass(a)
         self.assertEqual(memio.getvalue(), buf)
         self.assertEqual(memio.write(a), 10)
         self.assertEqual(memio.getvalue(), buf)
 
 
-class PyStringIOTest(MemoryTestMixin, unittest.TestCase):
+class PyStringIOTest(MemoryTestMixin, MemorySeekTestMixin, unittest.TestCase):
     buftype = unicode
-    ioclass = io.StringIO
+    ioclass = pyio.StringIO
+    UnsupportedOperation = pyio.UnsupportedOperation
     EOF = ""
 
+    # TextIO-specific behaviour.
+
+    def test_newlines_property(self):
+        memio = self.ioclass(newline=None)
+        # The C StringIO decodes newlines in write() calls, but the Python
+        # implementation only does when reading.  This function forces them to
+        # be decoded for testing.
+        def force_decode():
+            memio.seek(0)
+            memio.read()
+        self.assertEqual(memio.newlines, None)
+        memio.write("a\n")
+        force_decode()
+        self.assertEqual(memio.newlines, "\n")
+        memio.write("b\r\n")
+        force_decode()
+        self.assertEqual(memio.newlines, ("\n", "\r\n"))
+        memio.write("c\rd")
+        force_decode()
+        self.assertEqual(memio.newlines, ("\r", "\n", "\r\n"))
+
     def test_relative_seek(self):
         memio = self.ioclass()
 
@@ -388,29 +457,107 @@
         self.assertRaises(IOError, memio.seek, 1, 1)
         self.assertRaises(IOError, memio.seek, 1, 2)
 
+    def test_textio_properties(self):
+        memio = self.ioclass()
+
+        # These are just dummy values but we nevertheless check them for fear
+        # of unexpected breakage.
+        self.assertIsNone(memio.encoding)
+        self.assertIsNone(memio.errors)
+        self.assertFalse(memio.line_buffering)
+
+    def test_newline_none(self):
+        # newline=None
+        memio = self.ioclass("a\nb\r\nc\rd", newline=None)
+        self.assertEqual(list(memio), ["a\n", "b\n", "c\n", "d"])
+        memio.seek(0)
+        self.assertEqual(memio.read(1), "a")
+        self.assertEqual(memio.read(2), "\nb")
+        self.assertEqual(memio.read(2), "\nc")
+        self.assertEqual(memio.read(1), "\n")
+        memio = self.ioclass(newline=None)
+        self.assertEqual(2, memio.write("a\n"))
+        self.assertEqual(3, memio.write("b\r\n"))
+        self.assertEqual(3, memio.write("c\rd"))
+        memio.seek(0)
+        self.assertEqual(memio.read(), "a\nb\nc\nd")
+        memio = self.ioclass("a\r\nb", newline=None)
+        self.assertEqual(memio.read(3), "a\nb")
+
+    def test_newline_empty(self):
+        # newline=""
+        memio = self.ioclass("a\nb\r\nc\rd", newline="")
+        self.assertEqual(list(memio), ["a\n", "b\r\n", "c\r", "d"])
+        memio.seek(0)
+        self.assertEqual(memio.read(4), "a\nb\r")
+        self.assertEqual(memio.read(2), "\nc")
+        self.assertEqual(memio.read(1), "\r")
+        memio = self.ioclass(newline="")
+        self.assertEqual(2, memio.write("a\n"))
+        self.assertEqual(2, memio.write("b\r"))
+        self.assertEqual(2, memio.write("\nc"))
+        self.assertEqual(2, memio.write("\rd"))
+        memio.seek(0)
+        self.assertEqual(list(memio), ["a\n", "b\r\n", "c\r", "d"])
+
+    def test_newline_lf(self):
+        # newline="\n"
+        memio = self.ioclass("a\nb\r\nc\rd")
+        self.assertEqual(list(memio), ["a\n", "b\r\n", "c\rd"])
+
+    def test_newline_cr(self):
+        # newline="\r"
+        memio = self.ioclass("a\nb\r\nc\rd", newline="\r")
+        memio.seek(0)
+        self.assertEqual(memio.read(), "a\rb\r\rc\rd")
+        memio.seek(0)
+        self.assertEqual(list(memio), ["a\r", "b\r", "\r", "c\r", "d"])
+
+    def test_newline_crlf(self):
+        # newline="\r\n"
+        memio = self.ioclass("a\nb\r\nc\rd", newline="\r\n")
+        memio.seek(0)
+        self.assertEqual(memio.read(), "a\r\nb\r\r\nc\rd")
+        memio.seek(0)
+        self.assertEqual(list(memio), ["a\r\n", "b\r\r\n", "c\rd"])
+
+    def test_issue5265(self):
+        # StringIO can duplicate newlines in universal newlines mode
+        memio = self.ioclass("a\r\nb\r\n", newline=None)
+        self.assertEqual(memio.read(5), "a\nb\n")
+
+
+class CBytesIOTest(PyBytesIOTest):
+    ioclass = io.BytesIO
+    UnsupportedOperation = io.UnsupportedOperation
+
+    test_bytes_array = unittest.skip(
+        "array.array() does not have the new buffer API"
+    )(PyBytesIOTest.test_bytes_array)
+
+
+class CStringIOTest(PyStringIOTest):
+    ioclass = io.StringIO
+    UnsupportedOperation = io.UnsupportedOperation
+
     # XXX: For the Python version of io.StringIO, this is highly
     # dependent on the encoding used for the underlying buffer.
-    # def test_widechar(self):
-    #     buf = self.buftype("\U0002030a\U00020347")
-    #     memio = self.ioclass(buf)
-    #
-    #     self.assertEqual(memio.getvalue(), buf)
-    #     self.assertEqual(memio.write(buf), len(buf))
-    #     self.assertEqual(memio.tell(), len(buf))
-    #     self.assertEqual(memio.getvalue(), buf)
-    #     self.assertEqual(memio.write(buf), len(buf))
-    #     self.assertEqual(memio.tell(), len(buf) * 2)
-    #     self.assertEqual(memio.getvalue(), buf + buf)
-
-if has_c_implementation:
-    class CBytesIOTest(PyBytesIOTest):
-        ioclass = io.BytesIO
+    def test_widechar(self):
+        buf = self.buftype("\U0002030a\U00020347")
+        memio = self.ioclass(buf)
+
+        self.assertEqual(memio.getvalue(), buf)
+        self.assertEqual(memio.write(buf), len(buf))
+        self.assertEqual(memio.tell(), len(buf))
+        self.assertEqual(memio.getvalue(), buf)
+        self.assertEqual(memio.write(buf), len(buf))
+        self.assertEqual(memio.tell(), len(buf) * 2)
+        self.assertEqual(memio.getvalue(), buf + buf)
+
 
 def test_main():
-    tests = [PyBytesIOTest, PyStringIOTest]
-    if has_c_implementation:
-        tests.extend([CBytesIOTest])
-    test_support.run_unittest(*tests)
+    tests = [PyBytesIOTest, PyStringIOTest, CBytesIOTest, CStringIOTest]
+    support.run_unittest(*tests)
 
 if __name__ == '__main__':
     test_main()

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_signal.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_signal.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_signal.py	Sat Jun 20 00:11:15 2009
@@ -1,6 +1,6 @@
 import unittest
 from test import test_support
-from contextlib import closing, nested
+from contextlib import closing
 import gc
 import pickle
 import select
@@ -146,8 +146,8 @@
         # re-raises information about any exceptions the child
         # throws. The real work happens in self.run_test().
         os_done_r, os_done_w = os.pipe()
-        with nested(closing(os.fdopen(os_done_r)),
-                    closing(os.fdopen(os_done_w, 'w'))) as (done_r, done_w):
+        with closing(os.fdopen(os_done_r)) as done_r, \
+             closing(os.fdopen(os_done_w, 'w')) as done_w:
             child = os.fork()
             if child == 0:
                 # In the child process; run the test and report results

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_support.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_support.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_support.py	Sat Jun 20 00:11:15 2009
@@ -29,7 +29,7 @@
            "run_with_locale", "set_memlimit", "bigmemtest", "bigaddrspacetest",
            "BasicTestRunner", "run_unittest", "run_doctest", "threading_setup",
            "threading_cleanup", "reap_children", "cpython_only",
-           "check_impl_detail", "get_attribute"]
+           "check_impl_detail", "get_attribute", "py3k_bytes"]
 
 class Error(Exception):
     """Base class for regression test exceptions."""
@@ -968,3 +968,18 @@
                     break
             except:
                 break
+
+def py3k_bytes(b):
+    """Emulate the py3k bytes() constructor.
+
+    NOTE: This is only a best effort function.
+    """
+    try:
+        # memoryview?
+        return b.tobytes()
+    except AttributeError:
+        try:
+            # iterable of ints?
+            return b"".join(chr(x) for x in b)
+        except TypeError:
+            return bytes(b)

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_syntax.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_syntax.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_syntax.py	Sat Jun 20 00:11:15 2009
@@ -248,12 +248,12 @@
 SyntaxError: keyword can't be an expression
 
 
-From ast_for_expr_stmt():
+More set_context():
 
 >>> (x for x in x) += 1
 Traceback (most recent call last):
   File "<doctest test.test_syntax[31]>", line 1
-SyntaxError: augmented assignment to generator expression not possible
+SyntaxError: can't assign to generator expression
 >>> None += 1
 Traceback (most recent call last):
   File "<doctest test.test_syntax[32]>", line 1
@@ -261,7 +261,7 @@
 >>> f() += 1
 Traceback (most recent call last):
   File "<doctest test.test_syntax[33]>", line 1
-SyntaxError: illegal expression for augmented assignment
+SyntaxError: can't assign to function call
 
 
 Test continue in finally in weird combinations.
@@ -462,6 +462,12 @@
   File "<doctest test.test_syntax[49]>", line 1
 SyntaxError: keyword argument repeated
 
+>>> del ()
+Traceback (most recent call last):
+   ...
+  File "<doctest test.test_syntax[50]>", line 1
+SyntaxError: can't delete ()
+
 """
 
 import re

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_univnewlines.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_univnewlines.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_univnewlines.py	Sat Jun 20 00:11:15 2009
@@ -1,20 +1,28 @@
 # Tests universal newline support for both reading and parsing files.
+
+# NOTE: this file tests the new `io` library backported from Python 3.x.
+# Similar tests for the builtin file object can be found in test_univnewlines2k.py.
+
+from __future__ import print_function
+from __future__ import unicode_literals
+
+import io
+import _pyio as pyio
 import unittest
 import os
 import sys
-from test import test_support
+from test import test_support as support
 
 if not hasattr(sys.stdin, 'newlines'):
-    raise unittest.SkipTest, \
-        "This Python does not have universal newline support"
+    raise unittest.SkipTest(
+        "This Python does not have universal newline support")
 
 FATX = 'x' * (2**14)
 
 DATA_TEMPLATE = [
     "line1=1",
-    "line2='this is a very long line designed to go past the magic " +
-        "hundred character limit that is inside fileobject.c and which " +
-        "is meant to speed up the common case, but we also want to test " +
+    "line2='this is a very long line designed to go past any default " +
+        "buffer limits that exist in io.py but we also want to test " +
         "the uncommon case, naturally.'",
     "def line3():pass",
     "line4 = '%s'" % FATX,
@@ -28,48 +36,50 @@
 # before end-of-file.
 DATA_MIXED = "\n".join(DATA_TEMPLATE) + "\r"
 DATA_SPLIT = [x + "\n" for x in DATA_TEMPLATE]
-del x
 
 class TestGenericUnivNewlines(unittest.TestCase):
     # use a class variable DATA to define the data to write to the file
     # and a class variable NEWLINE to set the expected newlines value
-    READMODE = 'U'
+    READMODE = 'r'
     WRITEMODE = 'wb'
 
     def setUp(self):
-        with open(test_support.TESTFN, self.WRITEMODE) as fp:
-            fp.write(self.DATA)
+        data = self.DATA
+        if "b" in self.WRITEMODE:
+            data = data.encode("ascii")
+        with self.open(support.TESTFN, self.WRITEMODE) as fp:
+            fp.write(data)
 
     def tearDown(self):
         try:
-            os.unlink(test_support.TESTFN)
+            os.unlink(support.TESTFN)
         except:
             pass
 
     def test_read(self):
-        with open(test_support.TESTFN, self.READMODE) as fp:
+        with self.open(support.TESTFN, self.READMODE) as fp:
             data = fp.read()
         self.assertEqual(data, DATA_LF)
-        self.assertEqual(repr(fp.newlines), repr(self.NEWLINE))
+        self.assertEqual(set(fp.newlines), set(self.NEWLINE))
 
     def test_readlines(self):
-        with open(test_support.TESTFN, self.READMODE) as fp:
+        with self.open(support.TESTFN, self.READMODE) as fp:
             data = fp.readlines()
         self.assertEqual(data, DATA_SPLIT)
-        self.assertEqual(repr(fp.newlines), repr(self.NEWLINE))
+        self.assertEqual(set(fp.newlines), set(self.NEWLINE))
 
     def test_readline(self):
-        with open(test_support.TESTFN, self.READMODE) as fp:
+        with self.open(support.TESTFN, self.READMODE) as fp:
             data = []
             d = fp.readline()
             while d:
                 data.append(d)
                 d = fp.readline()
         self.assertEqual(data, DATA_SPLIT)
-        self.assertEqual(repr(fp.newlines), repr(self.NEWLINE))
+        self.assertEqual(set(fp.newlines), set(self.NEWLINE))
 
     def test_seek(self):
-        with open(test_support.TESTFN, self.READMODE) as fp:
+        with self.open(support.TESTFN, self.READMODE) as fp:
             fp.readline()
             pos = fp.tell()
             data = fp.readlines()
@@ -78,19 +88,6 @@
             data = fp.readlines()
         self.assertEqual(data, DATA_SPLIT[1:])
 
-    def test_execfile(self):
-        namespace = {}
-        execfile(test_support.TESTFN, namespace)
-        func = namespace['line3']
-        self.assertEqual(func.func_code.co_firstlineno, 3)
-        self.assertEqual(namespace['line4'], FATX)
-
-
-class TestNativeNewlines(TestGenericUnivNewlines):
-    NEWLINE = None
-    DATA = DATA_LF
-    READMODE = 'r'
-    WRITEMODE = 'w'
 
 class TestCRNewlines(TestGenericUnivNewlines):
     NEWLINE = '\r'
@@ -105,7 +102,7 @@
     DATA = DATA_CRLF
 
     def test_tell(self):
-        with open(test_support.TESTFN, self.READMODE) as fp:
+        with self.open(support.TESTFN, self.READMODE) as fp:
             self.assertEqual(repr(fp.newlines), repr(None))
             data = fp.readline()
             pos = fp.tell()
@@ -117,13 +114,22 @@
 
 
 def test_main():
-    test_support.run_unittest(
-        TestNativeNewlines,
-        TestCRNewlines,
-        TestLFNewlines,
-        TestCRLFNewlines,
-        TestMixedNewlines
-     )
+    base_tests = (TestCRNewlines,
+                  TestLFNewlines,
+                  TestCRLFNewlines,
+                  TestMixedNewlines)
+    tests = []
+    # Test the C and Python implementations.
+    for test in base_tests:
+        class CTest(test):
+            open = io.open
+        CTest.__name__ = str("C" + test.__name__)
+        class PyTest(test):
+            open = staticmethod(pyio.open)
+        PyTest.__name__ = str("Py" + test.__name__)
+        tests.append(CTest)
+        tests.append(PyTest)
+    support.run_unittest(*tests)
 
 if __name__ == '__main__':
     test_main()

Modified: python/branches/tk_and_idle_maintenance/Lib/test/test_winreg.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/test/test_winreg.py	(original)
+++ python/branches/tk_and_idle_maintenance/Lib/test/test_winreg.py	Sat Jun 20 00:11:15 2009
@@ -35,6 +35,27 @@
 class WinregTests(unittest.TestCase):
     remote_name = None
 
+    def setUp(self):
+        # Make sure that the test key is absent when the test
+        # starts.
+        self.delete_tree(HKEY_CURRENT_USER, test_key_name)
+
+    def delete_tree(self, root, subkey):
+        try:
+            hkey = OpenKey(root, subkey, KEY_ALL_ACCESS)
+        except WindowsError:
+            # subkey does not exist
+            return
+        while True:
+            try:
+                subsubkey = EnumKey(hkey, 0)
+            except WindowsError:
+                # no more subkeys
+                break
+            self.delete_tree(hkey, subsubkey)
+        CloseKey(hkey)
+        DeleteKey(root, subkey)
+
     def WriteTestData(self, root_key):
         # Set the default value for this key.
         SetValue(root_key, test_key_name, REG_SZ, "Default value")

Modified: python/branches/tk_and_idle_maintenance/Makefile.pre.in
==============================================================================
--- python/branches/tk_and_idle_maintenance/Makefile.pre.in	(original)
+++ python/branches/tk_and_idle_maintenance/Makefile.pre.in	Sat Jun 20 00:11:15 2009
@@ -541,7 +541,7 @@
 $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
 	$(ASDLGEN) -c $(AST_C_DIR) $(AST_ASDL)
 
-Python/compile.o Python/symtable.o: $(GRAMMAR_H) $(AST_H)
+Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
 
 Python/getplatform.o: $(srcdir)/Python/getplatform.c
 		$(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
@@ -1068,6 +1068,7 @@
 # install (which includes python-config) happy.
 frameworkinstallmaclib:
 	ln -fs "../../../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/python$(VERSION)/config/libpython$(VERSION).a"
+	ln -fs "../$(PYTHONFRAMEWORK)" "$(DESTDIR)$(prefix)/lib/libpython$(VERSION).dylib"
 	cd Mac && $(MAKE) installmacsubtree DESTDIR="$(DESTDIR)"
 
 # This installs the IDE, the Launcher and other apps into /Applications

Modified: python/branches/tk_and_idle_maintenance/Misc/NEWS
==============================================================================
--- python/branches/tk_and_idle_maintenance/Misc/NEWS	(original)
+++ python/branches/tk_and_idle_maintenance/Misc/NEWS	Sat Jun 20 00:11:15 2009
@@ -12,6 +12,16 @@
 Core and Builtins
 -----------------
 
+- Issue #6289: Encoding errors from compile() were being masked.
+
+- When no module is given in a relative import, the module field of the
+  ImportFrom AST node is now None instead of an empty string.
+
+- Assignment to None using import statements now raises a SyntaxError.
+
+- In the slice AST type, the step field will always be None if a step expression
+  is not specified.
+
 - Issue #4547: When debugging a very large function, it was not always
   possible to update the lineno attribute of the current frame.
 
@@ -317,6 +327,33 @@
 Library
 -------
 
+- Issue #6274: Fixed possible file descriptors leak in subprocess.py
+
+- Issue #6189: Restored compatibility of subprocess.py with Python 2.2.
+
+- Issue #6287: Added the license field in Distutils documentation.
+
+- Issue #6286: Now Distutils upload command is based on urllib2 instead of
+  httplib, allowing the usage of http_proxy.
+
+- Issue #6271: mmap tried to close invalid file handle (-1) when annonymous.
+  (On Unix)
+
+- Issue #6215: All bug fixes and enhancements from the Python 3.1 io library
+  (including the fast C implementation) have been backported to the standard
+  ``io`` module.
+
+- Issue #6258: Support AMD64 in bdist_msi.
+
+- Issue #5262: Fixed bug in next rollover time computation in
+  TimedRotatingFileHandler.
+
+- Issue #6263: Fixed syntax error in distutils.cygwincompiler.
+
+- Issue #5201: distutils.sysconfig.parse_makefile() now understands `$$`
+  in Makefiles. This prevents compile errors when using syntax like:
+  `LDFLAGS='-rpath=\$$LIB:/some/other/path'`. Patch by Floris Bruynooghe.
+
 - Issue #5767: Removed sgmlop support from xmlrpclib.
 
 - Issue #6131: test_modulefinder leaked when run after test_distutils.
@@ -345,7 +382,7 @@
 
 - Issue #1424152: Fix for httplib, urllib2 to support SSL while working through
   proxy. Original patch by Christopher Li, changes made by Senthil Kumaran.
- 
+
 - Issue #1983: Fix functions taking or returning a process identifier to use
   the dedicated C type ``pid_t`` instead of a C ``int``. Some platforms have
   a process identifier type wider than the standard C integer type.
@@ -353,7 +390,7 @@
 - Issue #4066: smtplib.SMTP_SSL._get_socket now correctly returns the socket.
   Patch by Farhan Ahmad, test by Marcin Bachry.
 
-- Issue #6062: In distutils, fixed the package option of build_ext. Feedback 
+- Issue #6062: In distutils, fixed the package option of build_ext. Feedback
   and tests on pywin32 by Tim Golden.
 
 - Issue #6053: Fixed distutils tests on win32. patch by Hirokazu Yamamoto.
@@ -361,7 +398,7 @@
 - Issue #6046: Fixed the library extension when distutils build_ext is used
   inplace. Initial patch by Roumen Petrov.
 
-- Issue #6041: Now distutils `sdist` and `register` commands use `check` as a 
+- Issue #6041: Now distutils `sdist` and `register` commands use `check` as a
   subcommand.
 
 - Issue #2116: Weak references and weak dictionaries now support copy()ing and
@@ -511,8 +548,8 @@
 
 - unittest.assertNotEqual() now uses the inequality operator (!=) instead
   of the equality operator.
-  
-- Issue #6001: Test discovery for unittest. Implemented in 
+
+- Issue #6001: Test discovery for unittest. Implemented in
   unittest.TestLoader.discover and from the command line.
 
 - Issue #5679: The methods unittest.TestCase.addCleanup and doCleanups were added.
@@ -522,11 +559,11 @@
 
 - Issue #3379: unittest.main now takes an optional exit argument. If False main
   doesn't call sys.exit allowing it to be used from the interactive interpreter.
-  
-- Issue #5995: unittest.main now takes an optional verbosity argument allowing 
+
+- Issue #5995: unittest.main now takes an optional verbosity argument allowing
   test modules to be run with a higher than default verbosity.
-  
-- Issue #5995: A fix to allow you to run "python -m unittest test_module" or 
+
+- Issue #5995: A fix to allow you to run "python -m unittest test_module" or
   "python -m unittest test_module.TestClass" from the command line.
 
 - Issue #5728: unittest.TestResult has new startTestRun and stopTestRun methods;
@@ -1005,6 +1042,9 @@
 Build
 -----
 
+- Issue 5809: Specifying both --enable-framework and --enable-shared is
+  an error. Configure now explicity tells you about this.
+
 - Issue #3585: Add pkg-config support. It creates a python-2.7.pc file
   and a python.pc symlink in the $(LIBDIR)/pkgconfig directory. Patch by
   Clinton Roy.

Deleted: python/branches/tk_and_idle_maintenance/Modules/_bytesio.c
==============================================================================
--- python/branches/tk_and_idle_maintenance/Modules/_bytesio.c	Sat Jun 20 00:11:15 2009
+++ (empty file)
@@ -1,763 +0,0 @@
-#include "Python.h"
-
-typedef struct {
-    PyObject_HEAD
-    char *buf;
-    Py_ssize_t pos;
-    Py_ssize_t string_size;
-    size_t buf_size;
-} BytesIOObject;
-
-#define CHECK_CLOSED(self)                                  \
-    if ((self)->buf == NULL) {                              \
-        PyErr_SetString(PyExc_ValueError,                   \
-                        "I/O operation on closed file.");   \
-        return NULL;                                        \
-    }
-
-/* Internal routine to get a line from the buffer of a BytesIO
-   object. Returns the length between the current position to the
-   next newline character. */
-static Py_ssize_t
-get_line(BytesIOObject *self, char **output)
-{
-    char *n;
-    const char *str_end;
-    Py_ssize_t len;
-
-    assert(self->buf != NULL);
-
-    /* Move to the end of the line, up to the end of the string, s. */
-    str_end = self->buf + self->string_size;
-    for (n = self->buf + self->pos;
-         n < str_end && *n != '\n';
-         n++);
-
-    /* Skip the newline character */
-    if (n < str_end)
-        n++;
-
-    /* Get the length from the current position to the end of the line. */
-    len = n - (self->buf + self->pos);
-    *output = self->buf + self->pos;
-
-    assert(len >= 0);
-    assert(self->pos < PY_SSIZE_T_MAX - len);
-    self->pos += len;
-
-    return len;
-}
-
-/* Internal routine for changing the size of the buffer of BytesIO objects.
-   The caller should ensure that the 'size' argument is non-negative.  Returns
-   0 on success, -1 otherwise. */
-static int
-resize_buffer(BytesIOObject *self, size_t size)
-{
-    /* Here, unsigned types are used to avoid dealing with signed integer
-       overflow, which is undefined in C. */
-    size_t alloc = self->buf_size;
-    char *new_buf = NULL;
-
-    assert(self->buf != NULL);
-
-    /* For simplicity, stay in the range of the signed type. Anyway, Python
-       doesn't allow strings to be longer than this. */
-    if (size > PY_SSIZE_T_MAX)
-        goto overflow;
-
-    if (size < alloc / 2) {
-        /* Major downsize; resize down to exact size. */
-        alloc = size + 1;
-    }
-    else if (size < alloc) {
-        /* Within allocated size; quick exit */
-        return 0;
-    }
-    else if (size <= alloc * 1.125) {
-        /* Moderate upsize; overallocate similar to list_resize() */
-        alloc = size + (size >> 3) + (size < 9 ? 3 : 6);
-    }
-    else {
-        /* Major upsize; resize up to exact size */
-        alloc = size + 1;
-    }
-
-    if (alloc > ((size_t)-1) / sizeof(char))
-        goto overflow;
-    new_buf = (char *)PyMem_Realloc(self->buf, alloc * sizeof(char));
-    if (new_buf == NULL) {
-        PyErr_NoMemory();
-        return -1;
-    }
-    self->buf_size = alloc;
-    self->buf = new_buf;
-
-    return 0;
-
-  overflow:
-    PyErr_SetString(PyExc_OverflowError,
-                    "new buffer size too large");
-    return -1;
-}
-
-/* Internal routine for writing a string of bytes to the buffer of a BytesIO
-   object. Returns the number of bytes wrote, or -1 on error. */
-static Py_ssize_t
-write_bytes(BytesIOObject *self, const char *bytes, Py_ssize_t len)
-{
-    assert(self->buf != NULL);
-    assert(self->pos >= 0);
-    assert(len >= 0);
-
-    if ((size_t)self->pos + len > self->buf_size) {
-        if (resize_buffer(self, (size_t)self->pos + len) < 0)
-            return -1;
-    }
-
-    if (self->pos > self->string_size) {
-        /* In case of overseek, pad with null bytes the buffer region between
-           the end of stream and the current position.
-
-          0   lo      string_size                           hi
-          |   |<---used--->|<----------available----------->|
-          |   |            <--to pad-->|<---to write--->    |
-          0   buf                   position
-        */
-        memset(self->buf + self->string_size, '\0',
-               (self->pos - self->string_size) * sizeof(char));
-    }
-
-    /* Copy the data to the internal buffer, overwriting some of the existing
-       data if self->pos < self->string_size. */
-    memcpy(self->buf + self->pos, bytes, len);
-    self->pos += len;
-
-    /* Set the new length of the internal string if it has changed. */
-    if (self->string_size < self->pos) {
-        self->string_size = self->pos;
-    }
-
-    return len;
-}
-
-static PyObject *
-bytesio_get_closed(BytesIOObject *self)
-{
-    if (self->buf == NULL)
-        Py_RETURN_TRUE;
-    else
-        Py_RETURN_FALSE;
-}
-
-/* Generic getter for the writable, readable and seekable properties */
-static PyObject *
-return_true(BytesIOObject *self)
-{
-    Py_RETURN_TRUE;
-}
-
-PyDoc_STRVAR(flush_doc,
-"flush() -> None.  Does nothing.");
-
-static PyObject *
-bytesio_flush(BytesIOObject *self)
-{
-    Py_RETURN_NONE;
-}
-
-PyDoc_STRVAR(getval_doc,
-"getvalue() -> bytes.\n"
-"\n"
-"Retrieve the entire contents of the BytesIO object.");
-
-static PyObject *
-bytesio_getvalue(BytesIOObject *self)
-{
-    CHECK_CLOSED(self);
-    return PyString_FromStringAndSize(self->buf, self->string_size);
-}
-
-PyDoc_STRVAR(isatty_doc,
-"isatty() -> False.\n"
-"\n"
-"Always returns False since BytesIO objects are not connected\n"
-"to a tty-like device.");
-
-static PyObject *
-bytesio_isatty(BytesIOObject *self)
-{
-    CHECK_CLOSED(self);
-    Py_RETURN_FALSE;
-}
-
-PyDoc_STRVAR(tell_doc,
-"tell() -> current file position, an integer\n");
-
-static PyObject *
-bytesio_tell(BytesIOObject *self)
-{
-    CHECK_CLOSED(self);
-    return PyInt_FromSsize_t(self->pos);
-}
-
-PyDoc_STRVAR(read_doc,
-"read([size]) -> read at most size bytes, returned as a string.\n"
-"\n"
-"If the size argument is negative, read until EOF is reached.\n"
-"Return an empty string at EOF.");
-
-static PyObject *
-bytesio_read(BytesIOObject *self, PyObject *args)
-{
-    Py_ssize_t size, n;
-    char *output;
-    PyObject *arg = Py_None;
-
-    CHECK_CLOSED(self);
-
-    if (!PyArg_ParseTuple(args, "|O:read", &arg))
-        return NULL;
-
-    if (PyInt_Check(arg)) {
-        size = PyInt_AsSsize_t(arg);
-        if (size == -1 && PyErr_Occurred())
-            return NULL;
-    }
-    else if (arg == Py_None) {
-        /* Read until EOF is reached, by default. */
-        size = -1;
-    }
-    else {
-        PyErr_Format(PyExc_TypeError, "integer argument expected, got '%s'",
-                     Py_TYPE(arg)->tp_name);
-        return NULL;
-    }
-
-    /* adjust invalid sizes */
-    n = self->string_size - self->pos;
-    if (size < 0 || size > n) {
-        size = n;
-        if (size < 0)
-            size = 0;
-    }
-
-    assert(self->buf != NULL);
-    output = self->buf + self->pos;
-    self->pos += size;
-
-    return PyString_FromStringAndSize(output, size);
-}
-
-
-PyDoc_STRVAR(read1_doc,
-"read1(size) -> read at most size bytes, returned as a string.\n"
-"\n"
-"If the size argument is negative or omitted, read until EOF is reached.\n"
-"Return an empty string at EOF.");
-
-static PyObject *
-bytesio_read1(BytesIOObject *self, PyObject *n)
-{
-    PyObject *arg, *res;
-
-    arg = PyTuple_Pack(1, n);
-    if (arg == NULL)
-        return NULL;
-    res  = bytesio_read(self, arg);
-    Py_DECREF(arg);
-    return res;
-}
-
-PyDoc_STRVAR(readline_doc,
-"readline([size]) -> next line from the file, as a string.\n"
-"\n"
-"Retain newline.  A non-negative size argument limits the maximum\n"
-"number of bytes to return (an incomplete line may be returned then).\n"
-"Return an empty string at EOF.\n");
-
-static PyObject *
-bytesio_readline(BytesIOObject *self, PyObject *args)
-{
-    Py_ssize_t size, n;
-    char *output;
-    PyObject *arg = Py_None;
-
-    CHECK_CLOSED(self);
-
-    if (!PyArg_ParseTuple(args, "|O:readline", &arg))
-        return NULL;
-
-    if (PyInt_Check(arg)) {
-        size = PyInt_AsSsize_t(arg);
-        if (size == -1 && PyErr_Occurred())
-            return NULL;
-    }
-    else if (arg == Py_None) {
-        /* No size limit, by default. */
-        size = -1;
-    }
-    else {
-        PyErr_Format(PyExc_TypeError, "integer argument expected, got '%s'",
-                     Py_TYPE(arg)->tp_name);
-        return NULL;
-    }
-
-    n = get_line(self, &output);
-
-    if (size >= 0 && size < n) {
-        size = n - size;
-        n -= size;
-        self->pos -= size;
-    }
-
-    return PyString_FromStringAndSize(output, n);
-}
-
-PyDoc_STRVAR(readlines_doc,
-"readlines([size]) -> list of strings, each a line from the file.\n"
-"\n"
-"Call readline() repeatedly and return a list of the lines so read.\n"
-"The optional size argument, if given, is an approximate bound on the\n"
-"total number of bytes in the lines returned.\n");
-
-static PyObject *
-bytesio_readlines(BytesIOObject *self, PyObject *args)
-{
-    Py_ssize_t maxsize, size, n;
-    PyObject *result, *line;
-    char *output;
-    PyObject *arg = Py_None;
-
-    CHECK_CLOSED(self);
-
-    if (!PyArg_ParseTuple(args, "|O:readlines", &arg))
-        return NULL;
-
-    if (PyInt_Check(arg)) {
-        maxsize = PyInt_AsSsize_t(arg);
-        if (maxsize == -1 && PyErr_Occurred())
-            return NULL;
-    }
-    else if (arg == Py_None) {
-        /* No size limit, by default. */
-        maxsize = -1;
-    }
-    else {
-        PyErr_Format(PyExc_TypeError, "integer argument expected, got '%s'",
-                     Py_TYPE(arg)->tp_name);
-        return NULL;
-    }
-
-    size = 0;
-    result = PyList_New(0);
-    if (!result)
-        return NULL;
-
-    while ((n = get_line(self, &output)) != 0) {
-        line = PyString_FromStringAndSize(output, n);
-        if (!line)
-            goto on_error;
-        if (PyList_Append(result, line) == -1) {
-            Py_DECREF(line);
-            goto on_error;
-        }
-        Py_DECREF(line);
-        size += n;
-        if (maxsize > 0 && size >= maxsize)
-            break;
-    }
-    return result;
-
-  on_error:
-    Py_DECREF(result);
-    return NULL;
-}
-
-PyDoc_STRVAR(readinto_doc,
-"readinto(bytearray) -> int.  Read up to len(b) bytes into b.\n"
-"\n"
-"Returns number of bytes read (0 for EOF), or None if the object\n"
-"is set not to block as has no data to read.");
-
-static PyObject *
-bytesio_readinto(BytesIOObject *self, PyObject *buffer)
-{
-    void *raw_buffer;
-    Py_ssize_t len;
-
-    CHECK_CLOSED(self);
-
-    if (PyObject_AsWriteBuffer(buffer, &raw_buffer, &len) == -1)
-        return NULL;
-
-    if (self->pos + len > self->string_size)
-        len = self->string_size - self->pos;
-
-    memcpy(raw_buffer, self->buf + self->pos, len);
-    assert(self->pos + len < PY_SSIZE_T_MAX);
-    assert(len >= 0);
-    self->pos += len;
-
-    return PyInt_FromSsize_t(len);
-}
-
-PyDoc_STRVAR(truncate_doc,
-"truncate([size]) -> int.  Truncate the file to at most size bytes.\n"
-"\n"
-"Size defaults to the current file position, as returned by tell().\n"
-"Returns the new size.  Imply an absolute seek to the position size.");
-
-static PyObject *
-bytesio_truncate(BytesIOObject *self, PyObject *args)
-{
-    Py_ssize_t size;
-    PyObject *arg = Py_None;
-
-    CHECK_CLOSED(self);
-
-    if (!PyArg_ParseTuple(args, "|O:truncate", &arg))
-        return NULL;
-
-    if (PyInt_Check(arg)) {
-        size = PyInt_AsSsize_t(arg);
-        if (size == -1 && PyErr_Occurred())
-            return NULL;
-    }
-    else if (arg == Py_None) {
-        /* Truncate to current position if no argument is passed. */
-        size = self->pos;
-    }
-    else {
-        PyErr_Format(PyExc_TypeError, "integer argument expected, got '%s'",
-                     Py_TYPE(arg)->tp_name);
-        return NULL;
-    }
-
-    if (size < 0) {
-        PyErr_Format(PyExc_ValueError,
-                     "negative size value %zd", size);
-        return NULL;
-    }
-
-    if (size < self->string_size) {
-        self->string_size = size;
-        if (resize_buffer(self, size) < 0)
-            return NULL;
-    }
-    self->pos = size;
-
-    return PyInt_FromSsize_t(size);
-}
-
-static PyObject *
-bytesio_iternext(BytesIOObject *self)
-{
-    char *next;
-    Py_ssize_t n;
-
-    CHECK_CLOSED(self);
-
-    n = get_line(self, &next);
-
-    if (!next || n == 0)
-        return NULL;
-
-    return PyString_FromStringAndSize(next, n);
-}
-
-PyDoc_STRVAR(seek_doc,
-"seek(pos, whence=0) -> int.  Change stream position.\n"
-"\n"
-"Seek to byte offset pos relative to position indicated by whence:\n"
-"     0  Start of stream (the default).  pos should be >= 0;\n"
-"     1  Current position - pos may be negative;\n"
-"     2  End of stream - pos usually negative.\n"
-"Returns the new absolute position.");
-
-static PyObject *
-bytesio_seek(BytesIOObject *self, PyObject *args)
-{
-    PyObject *pos_obj, *mode_obj;
-    Py_ssize_t pos;
-    int mode = 0;
-
-    CHECK_CLOSED(self);
-
-    /* Special-case for 2.x to prevent floats from passing through.
-       This only needed to make a test in test_io succeed. */
-    if (!PyArg_UnpackTuple(args, "seek", 1, 2, &pos_obj, &mode_obj))
-        return NULL;
-    if (PyFloat_Check(pos_obj)) {
-        PyErr_SetString(PyExc_TypeError,
-                        "position argument must be an integer");
-        return NULL;
-    }
-
-    if (!PyArg_ParseTuple(args, "n|i:seek", &pos, &mode))
-        return NULL;
-
-    if (pos < 0 && mode == 0) {
-        PyErr_Format(PyExc_ValueError,
-                     "negative seek value %zd", pos);
-        return NULL;
-    }
-
-    /* mode 0: offset relative to beginning of the string.
-       mode 1: offset relative to current position.
-       mode 2: offset relative the end of the string. */
-    if (mode == 1) {
-        if (pos > PY_SSIZE_T_MAX - self->pos) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "new position too large");
-            return NULL;
-        }
-        pos += self->pos;
-    }
-    else if (mode == 2) {
-        if (pos > PY_SSIZE_T_MAX - self->string_size) {
-            PyErr_SetString(PyExc_OverflowError,
-                            "new position too large");
-            return NULL;
-        }
-        pos += self->string_size;
-    }
-    else if (mode != 0) {
-        PyErr_Format(PyExc_ValueError,
-                     "invalid whence (%i, should be 0, 1 or 2)", mode);
-        return NULL;
-    }
-
-    if (pos < 0)
-        pos = 0;
-    self->pos = pos;
-
-    return PyInt_FromSsize_t(self->pos);
-}
-
-PyDoc_STRVAR(write_doc,
-"write(bytes) -> int.  Write bytes to file.\n"
-"\n"
-"Return the number of bytes written.");
-
-static PyObject *
-bytesio_write(BytesIOObject *self, PyObject *obj)
-{
-    const char *bytes;
-    Py_ssize_t size;
-    Py_ssize_t n = 0;
-
-    CHECK_CLOSED(self);
-
-    /* Special-case in 2.x to prevent unicode objects to pass through. */
-    if (PyUnicode_Check(obj)) {
-	    PyErr_SetString(PyExc_TypeError,
-                        "expecting a bytes object, got unicode");
-        return NULL;
-    }
-
-    if (PyObject_AsReadBuffer(obj, (void *)&bytes, &size) < 0)
-        return NULL;
-
-    if (size != 0) {
-        n = write_bytes(self, bytes, size);
-        if (n < 0)
-            return NULL;
-    }
-
-    return PyInt_FromSsize_t(n);
-}
-
-PyDoc_STRVAR(writelines_doc,
-"writelines(sequence_of_strings) -> None.  Write strings to the file.\n"
-"\n"
-"Note that newlines are not added.  The sequence can be any iterable\n"
-"object producing strings. This is equivalent to calling write() for\n"
-"each string.");
-
-static PyObject *
-bytesio_writelines(BytesIOObject *self, PyObject *v)
-{
-    PyObject *it, *item;
-    PyObject *ret;
-
-    CHECK_CLOSED(self);
-
-    it = PyObject_GetIter(v);
-    if (it == NULL)
-        return NULL;
-
-    while ((item = PyIter_Next(it)) != NULL) {
-        ret = bytesio_write(self, item);
-        Py_DECREF(item);
-        if (ret == NULL) {
-            Py_DECREF(it);
-            return NULL;
-        }
-        Py_DECREF(ret);
-    }
-    Py_DECREF(it);
-
-    /* See if PyIter_Next failed */
-    if (PyErr_Occurred())
-        return NULL;
-
-    Py_RETURN_NONE;
-}
-
-PyDoc_STRVAR(close_doc,
-"close() -> None.  Disable all I/O operations.");
-
-static PyObject *
-bytesio_close(BytesIOObject *self)
-{
-    if (self->buf != NULL) {
-        PyMem_Free(self->buf);
-        self->buf = NULL;
-    }
-    Py_RETURN_NONE;
-}
-
-static void
-bytesio_dealloc(BytesIOObject *self)
-{
-    if (self->buf != NULL) {
-        PyMem_Free(self->buf);
-        self->buf = NULL;
-    }
-    Py_TYPE(self)->tp_free(self);
-}
-
-static PyObject *
-bytesio_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-    BytesIOObject *self;
-
-    assert(type != NULL && type->tp_alloc != NULL);
-    self = (BytesIOObject *)type->tp_alloc(type, 0);
-    if (self == NULL)
-        return NULL;
-
-    self->string_size = 0;
-    self->pos = 0;
-    self->buf_size = 0;
-    self->buf = (char *)PyMem_Malloc(0);
-    if (self->buf == NULL) {
-        Py_DECREF(self);
-        return PyErr_NoMemory();
-    }
-
-    return (PyObject *)self;
-}
-
-static int
-bytesio_init(BytesIOObject *self, PyObject *args, PyObject *kwds)
-{
-    PyObject *initvalue = NULL;
-
-    if (!PyArg_ParseTuple(args, "|O:BytesIO", &initvalue))
-        return -1;
-
-    /* In case, __init__ is called multiple times. */
-    self->string_size = 0;
-    self->pos = 0;
-
-    if (initvalue && initvalue != Py_None) {
-        PyObject *res;
-        res = bytesio_write(self, initvalue);
-        if (res == NULL)
-            return -1;
-        Py_DECREF(res);
-        self->pos = 0;
-    }
-
-    return 0;
-}
-
-static PyGetSetDef bytesio_getsetlist[] = {
-    {"closed",  (getter)bytesio_get_closed, NULL,
-     "True if the file is closed."},
-    {0},            /* sentinel */
-};
-
-static struct PyMethodDef bytesio_methods[] = {
-    {"readable",   (PyCFunction)return_true,        METH_NOARGS, NULL},
-    {"seekable",   (PyCFunction)return_true,        METH_NOARGS, NULL},
-    {"writable",   (PyCFunction)return_true,        METH_NOARGS, NULL},
-    {"close",      (PyCFunction)bytesio_close,      METH_NOARGS, close_doc},
-    {"flush",      (PyCFunction)bytesio_flush,      METH_NOARGS, flush_doc},
-    {"isatty",     (PyCFunction)bytesio_isatty,     METH_NOARGS, isatty_doc},
-    {"tell",       (PyCFunction)bytesio_tell,       METH_NOARGS, tell_doc},
-    {"write",      (PyCFunction)bytesio_write,      METH_O, write_doc},
-    {"writelines", (PyCFunction)bytesio_writelines, METH_O, writelines_doc},
-    {"read1",      (PyCFunction)bytesio_read1,      METH_O, read1_doc},
-    {"readinto",   (PyCFunction)bytesio_readinto,   METH_O, readinto_doc},
-    {"readline",   (PyCFunction)bytesio_readline,   METH_VARARGS, readline_doc},
-    {"readlines",  (PyCFunction)bytesio_readlines,  METH_VARARGS, readlines_doc},
-    {"read",       (PyCFunction)bytesio_read,       METH_VARARGS, read_doc},
-    {"getvalue",   (PyCFunction)bytesio_getvalue,   METH_VARARGS, getval_doc},
-    {"seek",       (PyCFunction)bytesio_seek,       METH_VARARGS, seek_doc},
-    {"truncate",   (PyCFunction)bytesio_truncate,   METH_VARARGS, truncate_doc},
-    {NULL, NULL}        /* sentinel */
-};
-
-PyDoc_STRVAR(bytesio_doc,
-"BytesIO([buffer]) -> object\n"
-"\n"
-"Create a buffered I/O implementation using an in-memory bytes\n"
-"buffer, ready for reading and writing.");
-
-static PyTypeObject BytesIO_Type = {
-    PyVarObject_HEAD_INIT(NULL, 0)
-    "_bytesio._BytesIO",                       /*tp_name*/
-    sizeof(BytesIOObject),                     /*tp_basicsize*/
-    0,                                         /*tp_itemsize*/
-    (destructor)bytesio_dealloc,               /*tp_dealloc*/
-    0,                                         /*tp_print*/
-    0,                                         /*tp_getattr*/
-    0,                                         /*tp_setattr*/
-    0,                                         /*tp_compare*/
-    0,                                         /*tp_repr*/
-    0,                                         /*tp_as_number*/
-    0,                                         /*tp_as_sequence*/
-    0,                                         /*tp_as_mapping*/
-    0,                                         /*tp_hash*/
-    0,                                         /*tp_call*/
-    0,                                         /*tp_str*/
-    0,                                         /*tp_getattro*/
-    0,                                         /*tp_setattro*/
-    0,                                         /*tp_as_buffer*/
-    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,  /*tp_flags*/
-    bytesio_doc,                               /*tp_doc*/
-    0,                                         /*tp_traverse*/
-    0,                                         /*tp_clear*/
-    0,                                         /*tp_richcompare*/
-    0,                                         /*tp_weaklistoffset*/
-    PyObject_SelfIter,                         /*tp_iter*/
-    (iternextfunc)bytesio_iternext,            /*tp_iternext*/
-    bytesio_methods,                           /*tp_methods*/
-    0,                                         /*tp_members*/
-    bytesio_getsetlist,                        /*tp_getset*/
-    0,                                         /*tp_base*/
-    0,                                         /*tp_dict*/
-    0,                                         /*tp_descr_get*/
-    0,                                         /*tp_descr_set*/
-    0,                                         /*tp_dictoffset*/
-    (initproc)bytesio_init,                    /*tp_init*/
-    0,                                         /*tp_alloc*/
-    bytesio_new,                               /*tp_new*/
-};
-
-PyMODINIT_FUNC
-init_bytesio(void)
-{
-    PyObject *m;
-
-    if (PyType_Ready(&BytesIO_Type) < 0)
-        return;
-    m = Py_InitModule("_bytesio", NULL);
-    if (m == NULL)
-        return;
-    Py_INCREF(&BytesIO_Type);
-    PyModule_AddObject(m, "_BytesIO", (PyObject *)&BytesIO_Type);
-}

Deleted: python/branches/tk_and_idle_maintenance/Modules/_fileio.c
==============================================================================
--- python/branches/tk_and_idle_maintenance/Modules/_fileio.c	Sat Jun 20 00:11:15 2009
+++ (empty file)
@@ -1,935 +0,0 @@
-/* Author: Daniel Stutzbach */
-
-#define PY_SSIZE_T_CLEAN
-#include "Python.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stddef.h> /* For offsetof */
-
-/*
- * Known likely problems:
- *
- * - Files larger then 2**32-1
- * - Files with unicode filenames
- * - Passing numbers greater than 2**32-1 when an integer is expected
- * - Making it work on Windows and other oddball platforms
- *
- * To Do:
- *
- * - autoconfify header file inclusion
- */
-
-#ifdef MS_WINDOWS
-/* can simulate truncate with Win32 API functions; see file_truncate */
-#define HAVE_FTRUNCATE
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#endif
-
-typedef struct {
-	PyObject_HEAD
-	int fd;
-	unsigned readable : 1;
-	unsigned writable : 1;
-	int seekable : 2; /* -1 means unknown */
-	int closefd : 1;
-	PyObject *weakreflist;
-} PyFileIOObject;
-
-PyTypeObject PyFileIO_Type;
-
-#define PyFileIO_Check(op) (PyObject_TypeCheck((op), &PyFileIO_Type))
-
-static PyObject *
-portable_lseek(int fd, PyObject *posobj, int whence);
-
-/* Returns 0 on success, errno (which is < 0) on failure. */
-static int
-internal_close(PyFileIOObject *self)
-{
-	int save_errno = 0;
-	if (self->fd >= 0) {
-		int fd = self->fd;
-		self->fd = -1;
-		Py_BEGIN_ALLOW_THREADS
-		if (close(fd) < 0)
-			save_errno = errno;
-		Py_END_ALLOW_THREADS
-	}
-	return save_errno;
-}
-
-static PyObject *
-fileio_close(PyFileIOObject *self)
-{
-	if (!self->closefd) {
-		self->fd = -1;
-		Py_RETURN_NONE;
-	}
-	errno = internal_close(self);
-	if (errno < 0) {
-		PyErr_SetFromErrno(PyExc_IOError);
-		return NULL;
-	}
-
-	Py_RETURN_NONE;
-}
-
-static PyObject *
-fileio_new(PyTypeObject *type, PyObject *args, PyObject *kews)
-{
-	PyFileIOObject *self;
-
-	assert(type != NULL && type->tp_alloc != NULL);
-
-	self = (PyFileIOObject *) type->tp_alloc(type, 0);
-	if (self != NULL) {
-		self->fd = -1;
-		self->readable = 0;
-		self->writable = 0;
-		self->seekable = -1;
-		self->closefd = 1;
-		self->weakreflist = NULL;
-	}
-
-	return (PyObject *) self;
-}
-
-/* On Unix, open will succeed for directories.
-   In Python, there should be no file objects referring to
-   directories, so we need a check.  */
-
-static int
-dircheck(PyFileIOObject* self, char *name)
-{
-#if defined(HAVE_FSTAT) && defined(S_IFDIR) && defined(EISDIR)
-	struct stat buf;
-	if (self->fd < 0)
-		return 0;
-	if (fstat(self->fd, &buf) == 0 && S_ISDIR(buf.st_mode)) {
-		char *msg = strerror(EISDIR);
-		PyObject *exc;
-		internal_close(self);
-
-		exc = PyObject_CallFunction(PyExc_IOError, "(iss)",
-					    EISDIR, msg, name);
-		PyErr_SetObject(PyExc_IOError, exc);
-		Py_XDECREF(exc);
-		return -1;
-	}
-#endif
-	return 0;
-}
-
-static int
-check_fd(int fd)
-{
-#if defined(HAVE_FSTAT)
-	struct stat buf;
-	if (!_PyVerify_fd(fd) || (fstat(fd, &buf) < 0 && errno == EBADF)) {
-		PyObject *exc;
-		char *msg = strerror(EBADF);
-		exc = PyObject_CallFunction(PyExc_OSError, "(is)",
-					    EBADF, msg);
-		PyErr_SetObject(PyExc_OSError, exc);
-		Py_XDECREF(exc);
-		return -1;
-	}
-#endif
-	return 0;
-}
-
-
-static int
-fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
-{
-	PyFileIOObject *self = (PyFileIOObject *) oself;
-	static char *kwlist[] = {"file", "mode", "closefd", NULL};
-	char *name = NULL;
-	char *mode = "r";
-	char *s;
-#ifdef MS_WINDOWS
-	Py_UNICODE *widename = NULL;
-#endif
-	int ret = 0;
-	int rwa = 0, plus = 0, append = 0;
-	int flags = 0;
-	int fd = -1;
-	int closefd = 1;
-
-	assert(PyFileIO_Check(oself));
-	if (self->fd >= 0) {
-		/* Have to close the existing file first. */
-		if (internal_close(self) < 0)
-			return -1;
-	}
-
-	if (PyArg_ParseTupleAndKeywords(args, kwds, "i|si:fileio",
-					kwlist, &fd, &mode, &closefd)) {
-		if (fd < 0) {
-			PyErr_SetString(PyExc_ValueError,
-					"Negative filedescriptor");
-			return -1;
-		}
-		if (check_fd(fd))
-			return -1;
-	}
-	else {
-		PyErr_Clear();
-
-#ifdef MS_WINDOWS
-	    if (GetVersion() < 0x80000000) {
-		/* On NT, so wide API available */
-		PyObject *po;
-		if (PyArg_ParseTupleAndKeywords(args, kwds, "U|si:fileio",
-						kwlist, &po, &mode, &closefd)
-						) {
-			widename = PyUnicode_AS_UNICODE(po);
-		} else {
-			/* Drop the argument parsing error as narrow
-			   strings are also valid. */
-			PyErr_Clear();
-		}
-	    }
-	    if (widename == NULL)
-#endif
-	    {
-		if (!PyArg_ParseTupleAndKeywords(args, kwds, "et|si:fileio",
-						 kwlist,
-						 Py_FileSystemDefaultEncoding,
-						 &name, &mode, &closefd))
-			return -1;
-	    }
-	}
-
-	s = mode;
-	while (*s) {
-		switch (*s++) {
-		case 'r':
-			if (rwa) {
-			bad_mode:
-				PyErr_SetString(PyExc_ValueError,
-						"Must have exactly one of read/write/append mode");
-				goto error;
-			}
-			rwa = 1;
-			self->readable = 1;
-			break;
-		case 'w':
-			if (rwa)
-				goto bad_mode;
-			rwa = 1;
-			self->writable = 1;
-			flags |= O_CREAT | O_TRUNC;
-			break;
-		case 'a':
-			if (rwa)
-				goto bad_mode;
-			rwa = 1;
-			self->writable = 1;
-			flags |= O_CREAT;
-			append = 1;
-			break;
-		case 'b':
-			break;
-		case '+':
-			if (plus)
-				goto bad_mode;
-			self->readable = self->writable = 1;
-			plus = 1;
-			break;
-		default:
-			PyErr_Format(PyExc_ValueError,
-				     "invalid mode: %.200s", mode);
-			goto error;
-		}
-	}
-
-	if (!rwa)
-		goto bad_mode;
-
-	if (self->readable && self->writable)
-		flags |= O_RDWR;
-	else if (self->readable)
-		flags |= O_RDONLY;
-	else
-		flags |= O_WRONLY;
-
-#ifdef O_BINARY
-	flags |= O_BINARY;
-#endif
-
-#ifdef O_APPEND
-	if (append)
-		flags |= O_APPEND;
-#endif
-
-	if (fd >= 0) {
-		self->fd = fd;
-		self->closefd = closefd;
-	}
-	else {
-		self->closefd = 1;
-		if (!closefd) {
-			PyErr_SetString(PyExc_ValueError,
-                            "Cannot use closefd=False with file name");
-			goto error;
-		}
-
-		Py_BEGIN_ALLOW_THREADS
-		errno = 0;
-#ifdef MS_WINDOWS
-		if (widename != NULL)
-			self->fd = _wopen(widename, flags, 0666);
-		else
-#endif
-			self->fd = open(name, flags, 0666);
-		Py_END_ALLOW_THREADS
-		if (self->fd < 0) {
-#ifdef MS_WINDOWS
-			if (widename != NULL)
-				PyErr_SetFromErrnoWithUnicodeFilename(PyExc_IOError, widename);
-			else
-#endif
-				PyErr_SetFromErrnoWithFilename(PyExc_IOError, name);
-			goto error;
-		}
-		if(dircheck(self, name) < 0)
-			goto error;
-	}
-
-	if (append) {
-		/* For consistent behaviour, we explicitly seek to the
-		   end of file (otherwise, it might be done only on the
-		   first write()). */
-		PyObject *pos = portable_lseek(self->fd, NULL, 2);
-		if (pos == NULL)
-			goto error;
-		Py_DECREF(pos);
-	}
-
-	goto done;
-
- error:
-	ret = -1;
-
- done:
-	PyMem_Free(name);
-	return ret;
-}
-
-static void
-fileio_dealloc(PyFileIOObject *self)
-{
-	if (self->weakreflist != NULL)
-		PyObject_ClearWeakRefs((PyObject *) self);
-
-	if (self->fd >= 0 && self->closefd) {
-		errno = internal_close(self);
-		if (errno < 0) {
-			PySys_WriteStderr("close failed: [Errno %d] %s\n",
-                                          errno, strerror(errno));
-		}
-	}
-
-	Py_TYPE(self)->tp_free((PyObject *)self);
-}
-
-static PyObject *
-err_closed(void)
-{
-	PyErr_SetString(PyExc_ValueError, "I/O operation on closed file");
-	return NULL;
-}
-
-static PyObject *
-err_mode(char *action)
-{
-	PyErr_Format(PyExc_ValueError, "File not open for %s", action);
-	return NULL;
-}
-
-static PyObject *
-fileio_fileno(PyFileIOObject *self)
-{
-	if (self->fd < 0)
-		return err_closed();
-	return PyInt_FromLong((long) self->fd);
-}
-
-static PyObject *
-fileio_readable(PyFileIOObject *self)
-{
-	if (self->fd < 0)
-		return err_closed();
-	return PyBool_FromLong((long) self->readable);
-}
-
-static PyObject *
-fileio_writable(PyFileIOObject *self)
-{
-	if (self->fd < 0)
-		return err_closed();
-	return PyBool_FromLong((long) self->writable);
-}
-
-static PyObject *
-fileio_seekable(PyFileIOObject *self)
-{
-	if (self->fd < 0)
-		return err_closed();
-	if (self->seekable < 0) {
-		int ret;
-		Py_BEGIN_ALLOW_THREADS
-		ret = lseek(self->fd, 0, SEEK_CUR);
-		Py_END_ALLOW_THREADS
-		if (ret < 0)
-			self->seekable = 0;
-		else
-			self->seekable = 1;
-	}
-	return PyBool_FromLong((long) self->seekable);
-}
-
-static PyObject *
-fileio_readinto(PyFileIOObject *self, PyObject *args)
-{
-	Py_buffer pbuf;
-	Py_ssize_t n;
-
-	if (self->fd < 0)
-		return err_closed();
-	if (!self->readable)
-		return err_mode("reading");
-
-	if (!PyArg_ParseTuple(args, "w*", &pbuf))
-		return NULL;
-
-	Py_BEGIN_ALLOW_THREADS
-	errno = 0;
-	n = read(self->fd, pbuf.buf, pbuf.len);
-	Py_END_ALLOW_THREADS
-	PyBuffer_Release(&pbuf);
-	if (n < 0) {
-		if (errno == EAGAIN)
-			Py_RETURN_NONE;
-		PyErr_SetFromErrno(PyExc_IOError);
-		return NULL;
-	}
-
-	return PyLong_FromSsize_t(n);
-}
-
-#define DEFAULT_BUFFER_SIZE (8*1024)
-
-static PyObject *
-fileio_readall(PyFileIOObject *self)
-{
-	PyObject *result;
-	Py_ssize_t total = 0;
-	int n;
-
-	result = PyString_FromStringAndSize(NULL, DEFAULT_BUFFER_SIZE);
-	if (result == NULL)
-		return NULL;
-
-	while (1) {
-		Py_ssize_t newsize = total + DEFAULT_BUFFER_SIZE;
-		if (PyString_GET_SIZE(result) < newsize) {
-			if (_PyString_Resize(&result, newsize) < 0) {
-				if (total == 0) {
-					Py_DECREF(result);
-					return NULL;
-				}
-				PyErr_Clear();
-				break;
-			}
-		}
-		Py_BEGIN_ALLOW_THREADS
-		errno = 0;
-		n = read(self->fd,
-			 PyString_AS_STRING(result) + total,
-			 newsize - total);
-		Py_END_ALLOW_THREADS
-		if (n == 0)
-			break;
-		if (n < 0) {
-			if (total > 0)
-				break;
-			if (errno == EAGAIN) {
-				Py_DECREF(result);
-				Py_RETURN_NONE;
-			}
-			Py_DECREF(result);
-			PyErr_SetFromErrno(PyExc_IOError);
-			return NULL;
-		}
-		total += n;
-	}
-
-	if (PyString_GET_SIZE(result) > total) {
-		if (_PyString_Resize(&result, total) < 0) {
-			/* This should never happen, but just in case */
-			Py_DECREF(result);
-			return NULL;
-		}
-	}
-	return result;
-}
-
-static PyObject *
-fileio_read(PyFileIOObject *self, PyObject *args)
-{
-	char *ptr;
-	Py_ssize_t n;
-	Py_ssize_t size = -1;
-	PyObject *bytes;
-
-	if (self->fd < 0)
-		return err_closed();
-	if (!self->readable)
-		return err_mode("reading");
-
-	if (!PyArg_ParseTuple(args, "|n", &size))
-		return NULL;
-
-        if (size < 0) {
-		return fileio_readall(self);
-	}
-
-	bytes = PyString_FromStringAndSize(NULL, size);
-	if (bytes == NULL)
-		return NULL;
-	ptr = PyString_AS_STRING(bytes);
-
-	Py_BEGIN_ALLOW_THREADS
-	errno = 0;
-	n = read(self->fd, ptr, size);
-	Py_END_ALLOW_THREADS
-
-	if (n < 0) {
-		if (errno == EAGAIN)
-			Py_RETURN_NONE;
-		PyErr_SetFromErrno(PyExc_IOError);
-		return NULL;
-	}
-
-	if (n != size) {
-		if (_PyString_Resize(&bytes, n) < 0) {
-			Py_DECREF(bytes);
-			return NULL;
-		}
-	}
-
-	return (PyObject *) bytes;
-}
-
-static PyObject *
-fileio_write(PyFileIOObject *self, PyObject *args)
-{
-	Py_buffer pbuf;
-	Py_ssize_t n;
-
-	if (self->fd < 0)
-		return err_closed();
-	if (!self->writable)
-		return err_mode("writing");
-
-	if (!PyArg_ParseTuple(args, "s*", &pbuf))
-		return NULL;
-
-	Py_BEGIN_ALLOW_THREADS
-	errno = 0;
-	n = write(self->fd, pbuf.buf, pbuf.len);
-	Py_END_ALLOW_THREADS
-
-	PyBuffer_Release(&pbuf);
-
-	if (n < 0) {
-		if (errno == EAGAIN)
-			Py_RETURN_NONE;
-		PyErr_SetFromErrno(PyExc_IOError);
-		return NULL;
-	}
-
-	return PyLong_FromSsize_t(n);
-}
-
-/* XXX Windows support below is likely incomplete */
-
-#if defined(MS_WIN64) || defined(MS_WINDOWS)
-typedef PY_LONG_LONG Py_off_t;
-#else
-typedef off_t Py_off_t;
-#endif
-
-/* Cribbed from posix_lseek() */
-static PyObject *
-portable_lseek(int fd, PyObject *posobj, int whence)
-{
-	Py_off_t pos, res;
-
-#ifdef SEEK_SET
-	/* Turn 0, 1, 2 into SEEK_{SET,CUR,END} */
-	switch (whence) {
-#if SEEK_SET != 0
-	case 0: whence = SEEK_SET; break;
-#endif
-#if SEEK_CUR != 1
-	case 1: whence = SEEK_CUR; break;
-#endif
-#if SEEK_END != 2
-	case 2: whence = SEEK_END; break;
-#endif
-	}
-#endif /* SEEK_SET */
-
-	if (posobj == NULL)
-		pos = 0;
-	else {
-		if(PyFloat_Check(posobj)) {
-			PyErr_SetString(PyExc_TypeError, "an integer is required");
-			return NULL;
-		}
-#if defined(HAVE_LARGEFILE_SUPPORT)
-		pos = PyLong_AsLongLong(posobj);
-#else
-		pos = PyLong_AsLong(posobj);
-#endif
-		if (PyErr_Occurred())
-			return NULL;
-	}
-
-	Py_BEGIN_ALLOW_THREADS
-#if defined(MS_WIN64) || defined(MS_WINDOWS)
-	res = _lseeki64(fd, pos, whence);
-#else
-	res = lseek(fd, pos, whence);
-#endif
-	Py_END_ALLOW_THREADS
-	if (res < 0)
-		return PyErr_SetFromErrno(PyExc_IOError);
-
-#if defined(HAVE_LARGEFILE_SUPPORT)
-	return PyLong_FromLongLong(res);
-#else
-	return PyLong_FromLong(res);
-#endif
-}
-
-static PyObject *
-fileio_seek(PyFileIOObject *self, PyObject *args)
-{
-	PyObject *posobj;
-	int whence = 0;
-
-	if (self->fd < 0)
-		return err_closed();
-
-	if (!PyArg_ParseTuple(args, "O|i", &posobj, &whence))
-		return NULL;
-
-	return portable_lseek(self->fd, posobj, whence);
-}
-
-static PyObject *
-fileio_tell(PyFileIOObject *self, PyObject *args)
-{
-	if (self->fd < 0)
-		return err_closed();
-
-	return portable_lseek(self->fd, NULL, 1);
-}
-
-#ifdef HAVE_FTRUNCATE
-static PyObject *
-fileio_truncate(PyFileIOObject *self, PyObject *args)
-{
-	PyObject *posobj = NULL;
-	Py_off_t pos;
-	int ret;
-	int fd;
-
-	fd = self->fd;
-	if (fd < 0)
-		return err_closed();
-	if (!self->writable)
-		return err_mode("writing");
-
-	if (!PyArg_ParseTuple(args, "|O", &posobj))
-		return NULL;
-
-	if (posobj == Py_None || posobj == NULL) {
-		/* Get the current position. */
-                posobj = portable_lseek(fd, NULL, 1);
-                if (posobj == NULL)
-			return NULL;
-        }
-        else {
-		/* Move to the position to be truncated. */
-                posobj = portable_lseek(fd, posobj, 0);
-        }
-
-#if defined(HAVE_LARGEFILE_SUPPORT)
-	pos = PyLong_AsLongLong(posobj);
-#else
-	pos = PyLong_AsLong(posobj);
-#endif
-	if (PyErr_Occurred())
-		return NULL;
-
-#ifdef MS_WINDOWS
-	/* MS _chsize doesn't work if newsize doesn't fit in 32 bits,
-	   so don't even try using it. */
-	{
-		HANDLE hFile;
-
-		/* Truncate.  Note that this may grow the file! */
-		Py_BEGIN_ALLOW_THREADS
-		errno = 0;
-		hFile = (HANDLE)_get_osfhandle(fd);
-		ret = hFile == (HANDLE)-1;
-		if (ret == 0) {
-			ret = SetEndOfFile(hFile) == 0;
-			if (ret)
-				errno = EACCES;
-		}
-		Py_END_ALLOW_THREADS
-	}
-#else
-	Py_BEGIN_ALLOW_THREADS
-	errno = 0;
-	ret = ftruncate(fd, pos);
-	Py_END_ALLOW_THREADS
-#endif /* !MS_WINDOWS */
-
-	if (ret != 0) {
-		PyErr_SetFromErrno(PyExc_IOError);
-		return NULL;
-	}
-
-	return posobj;
-}
-#endif
-
-static char *
-mode_string(PyFileIOObject *self)
-{
-	if (self->readable) {
-		if (self->writable)
-			return "rb+";
-		else
-			return "rb";
-	}
-	else
-		return "wb";
-}
-
-static PyObject *
-fileio_repr(PyFileIOObject *self)
-{
-        if (self->fd < 0)
-		return PyString_FromFormat("_fileio._FileIO(-1)");
-
-	return PyString_FromFormat("_fileio._FileIO(%d, '%s')",
-				   self->fd, mode_string(self));
-}
-
-static PyObject *
-fileio_isatty(PyFileIOObject *self)
-{
-	long res;
-
-	if (self->fd < 0)
-		return err_closed();
-	Py_BEGIN_ALLOW_THREADS
-	res = isatty(self->fd);
-	Py_END_ALLOW_THREADS
-	return PyBool_FromLong(res);
-}
-
-
-PyDoc_STRVAR(fileio_doc,
-"file(name: str[, mode: str]) -> file IO object\n"
-"\n"
-"Open a file.  The mode can be 'r', 'w' or 'a' for reading (default),\n"
-"writing or appending.	The file will be created if it doesn't exist\n"
-"when opened for writing or appending; it will be truncated when\n"
-"opened for writing.  Add a '+' to the mode to allow simultaneous\n"
-"reading and writing.");
-
-PyDoc_STRVAR(read_doc,
-"read(size: int) -> bytes.  read at most size bytes, returned as bytes.\n"
-"\n"
-"Only makes one system call, so less data may be returned than requested\n"
-"In non-blocking mode, returns None if no data is available.\n"
-"On end-of-file, returns ''.");
-
-PyDoc_STRVAR(readall_doc,
-"readall() -> bytes.  read all data from the file, returned as bytes.\n"
-"\n"
-"In non-blocking mode, returns as much as is immediately available,\n"
-"or None if no data is available.  On end-of-file, returns ''.");
-
-PyDoc_STRVAR(write_doc,
-"write(b: bytes) -> int.  Write bytes b to file, return number written.\n"
-"\n"
-"Only makes one system call, so not all of the data may be written.\n"
-"The number of bytes actually written is returned.");
-
-PyDoc_STRVAR(fileno_doc,
-"fileno() -> int. \"file descriptor\".\n"
-"\n"
-"This is needed for lower-level file interfaces, such the fcntl module.");
-
-PyDoc_STRVAR(seek_doc,
-"seek(offset: int[, whence: int]) -> None.  Move to new file position.\n"
-"\n"
-"Argument offset is a byte count.  Optional argument whence defaults to\n"
-"0 (offset from start of file, offset should be >= 0); other values are 1\n"
-"(move relative to current position, positive or negative), and 2 (move\n"
-"relative to end of file, usually negative, although many platforms allow\n"
-"seeking beyond the end of a file)."
-"\n"
-"Note that not all file objects are seekable.");
-
-#ifdef HAVE_FTRUNCATE
-PyDoc_STRVAR(truncate_doc,
-"truncate([size: int]) -> None.	 Truncate the file to at most size bytes.\n"
-"\n"
-"Size defaults to the current file position, as returned by tell()."
-"The current file position is changed to the value of size.");
-#endif
-
-PyDoc_STRVAR(tell_doc,
-"tell() -> int.	 Current file position");
-
-PyDoc_STRVAR(readinto_doc,
-"readinto() -> Undocumented.  Don't use this; it may go away.");
-
-PyDoc_STRVAR(close_doc,
-"close() -> None.  Close the file.\n"
-"\n"
-"A closed file cannot be used for further I/O operations.  close() may be\n"
-"called more than once without error.  Changes the fileno to -1.");
-
-PyDoc_STRVAR(isatty_doc,
-"isatty() -> bool.  True if the file is connected to a tty device.");
-
-PyDoc_STRVAR(seekable_doc,
-"seekable() -> bool.  True if file supports random-access.");
-
-PyDoc_STRVAR(readable_doc,
-"readable() -> bool.  True if file was opened in a read mode.");
-
-PyDoc_STRVAR(writable_doc,
-"writable() -> bool.  True if file was opened in a write mode.");
-
-static PyMethodDef fileio_methods[] = {
-	{"read",     (PyCFunction)fileio_read,	   METH_VARARGS, read_doc},
-	{"readall",  (PyCFunction)fileio_readall,  METH_NOARGS,  readall_doc},
-	{"readinto", (PyCFunction)fileio_readinto, METH_VARARGS, readinto_doc},
-	{"write",    (PyCFunction)fileio_write,	   METH_VARARGS, write_doc},
-	{"seek",     (PyCFunction)fileio_seek,	   METH_VARARGS, seek_doc},
-	{"tell",     (PyCFunction)fileio_tell,	   METH_VARARGS, tell_doc},
-#ifdef HAVE_FTRUNCATE
-	{"truncate", (PyCFunction)fileio_truncate, METH_VARARGS, truncate_doc},
-#endif
-	{"close",    (PyCFunction)fileio_close,	   METH_NOARGS,	 close_doc},
-	{"seekable", (PyCFunction)fileio_seekable, METH_NOARGS,	 seekable_doc},
-	{"readable", (PyCFunction)fileio_readable, METH_NOARGS,	 readable_doc},
-	{"writable", (PyCFunction)fileio_writable, METH_NOARGS,	 writable_doc},
-	{"fileno",   (PyCFunction)fileio_fileno,   METH_NOARGS,	 fileno_doc},
-	{"isatty",   (PyCFunction)fileio_isatty,   METH_NOARGS,	 isatty_doc},
-	{NULL,	     NULL}	       /* sentinel */
-};
-
-/* 'closed' and 'mode' are attributes for backwards compatibility reasons. */
-
-static PyObject *
-get_closed(PyFileIOObject *self, void *closure)
-{
-	return PyBool_FromLong((long)(self->fd < 0));
-}
-
-static PyObject *
-get_closefd(PyFileIOObject *self, void *closure)
-{
-	return PyBool_FromLong((long)(self->closefd));
-}
-
-static PyObject *
-get_mode(PyFileIOObject *self, void *closure)
-{
-	return PyString_FromString(mode_string(self));
-}
-
-static PyGetSetDef fileio_getsetlist[] = {
-	{"closed", (getter)get_closed, NULL, "True if the file is closed"},
-	{"closefd", (getter)get_closefd, NULL, 
-		"True if the file descriptor will be closed"},
-	{"mode", (getter)get_mode, NULL, "String giving the file mode"},
-	{0},
-};
-
-PyTypeObject PyFileIO_Type = {
-	PyVarObject_HEAD_INIT(NULL, 0)
-	"_FileIO",
-	sizeof(PyFileIOObject),
-	0,
-	(destructor)fileio_dealloc,		/* tp_dealloc */
-	0,					/* tp_print */
-	0,					/* tp_getattr */
-	0,					/* tp_setattr */
-	0,					/* tp_compare */
-	(reprfunc)fileio_repr,			/* tp_repr */
-	0,					/* tp_as_number */
-	0,					/* tp_as_sequence */
-	0,					/* tp_as_mapping */
-	0,					/* tp_hash */
-	0,					/* tp_call */
-	0,					/* tp_str */
-	PyObject_GenericGetAttr,		/* tp_getattro */
-	0,					/* tp_setattro */
-	0,					/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
-	fileio_doc,				/* tp_doc */
-	0,					/* tp_traverse */
-	0,					/* tp_clear */
-	0,					/* tp_richcompare */
-	offsetof(PyFileIOObject, weakreflist),	/* tp_weaklistoffset */
-	0,					/* tp_iter */
-	0,					/* tp_iternext */
-	fileio_methods,				/* tp_methods */
-	0,					/* tp_members */
-	fileio_getsetlist,			/* tp_getset */
-	0,					/* tp_base */
-	0,					/* tp_dict */
-	0,					/* tp_descr_get */
-	0,					/* tp_descr_set */
-	0,					/* tp_dictoffset */
-	fileio_init,				/* tp_init */
-	PyType_GenericAlloc,			/* tp_alloc */
-	fileio_new,				/* tp_new */
-	PyObject_Del,				/* tp_free */
-};
-
-static PyMethodDef module_methods[] = {
-	{NULL, NULL}
-};
-
-PyMODINIT_FUNC
-init_fileio(void)
-{
-	PyObject *m;	/* a module object */
-
-	m = Py_InitModule3("_fileio", module_methods,
-			   "Fast implementation of io.FileIO.");
-	if (m == NULL)
-		return;
-	if (PyType_Ready(&PyFileIO_Type) < 0)
-		return;
-	Py_INCREF(&PyFileIO_Type);
-	PyModule_AddObject(m, "_FileIO", (PyObject *) &PyFileIO_Type);
-}

Modified: python/branches/tk_and_idle_maintenance/Modules/audioop.c
==============================================================================
--- python/branches/tk_and_idle_maintenance/Modules/audioop.c	(original)
+++ python/branches/tk_and_idle_maintenance/Modules/audioop.c	Sat Jun 20 00:11:15 2009
@@ -1116,7 +1116,7 @@
         outrate /= d;
 
         alloc_size = sizeof(int) * (unsigned)nchannels;
-        if (alloc_size < nchannels) {
+        if (alloc_size < (unsigned)nchannels) {
                 PyErr_SetString(PyExc_MemoryError,
                                 "not enough memory for output buffer");
                 return 0;

Modified: python/branches/tk_and_idle_maintenance/Modules/mmapmodule.c
==============================================================================
--- python/branches/tk_and_idle_maintenance/Modules/mmapmodule.c	(original)
+++ python/branches/tk_and_idle_maintenance/Modules/mmapmodule.c	Sat Jun 20 00:11:15 2009
@@ -158,7 +158,8 @@
 #endif /* MS_WINDOWS */
 
 #ifdef UNIX
-	(void) close(self->fd);
+	if (0 <= self->fd)
+		(void) close(self->fd);
 	self->fd = -1;
 	if (self->data != NULL) {
 		munmap(self->data, self->size);

Modified: python/branches/tk_and_idle_maintenance/Objects/exceptions.c
==============================================================================
--- python/branches/tk_and_idle_maintenance/Objects/exceptions.c	(original)
+++ python/branches/tk_and_idle_maintenance/Objects/exceptions.c	Sat Jun 20 00:11:15 2009
@@ -9,7 +9,6 @@
 #include "structmember.h"
 #include "osdefs.h"
 
-#define MAKE_IT_NONE(x) (x) = Py_None; Py_INCREF(Py_None);
 #define EXC_MODULE_NAME "exceptions."
 
 /* NOTE: If the exception class hierarchy changes, don't forget to update
@@ -2136,6 +2135,6 @@
 void
 _PyExc_Fini(void)
 {
-    Py_XDECREF(PyExc_MemoryErrorInst);
-    PyExc_MemoryErrorInst = NULL;
+    Py_CLEAR(PyExc_MemoryErrorInst);
+    Py_CLEAR(PyExc_RecursionErrorInst);
 }

Modified: python/branches/tk_and_idle_maintenance/Objects/floatobject.c
==============================================================================
--- python/branches/tk_and_idle_maintenance/Objects/floatobject.c	(original)
+++ python/branches/tk_and_idle_maintenance/Objects/floatobject.c	Sat Jun 20 00:11:15 2009
@@ -72,7 +72,7 @@
 static PyTypeObject FloatInfoType = {0, 0, 0, 0, 0, 0};
 
 PyDoc_STRVAR(floatinfo__doc__,
-"sys.floatinfo\n\
+"sys.float_info\n\
 \n\
 A structseq holding information about the float type. It contains low level\n\
 information about the precision and internal representation. Please study\n\
@@ -99,7 +99,7 @@
 };
 
 static PyStructSequence_Desc floatinfo_desc = {
-	"sys.floatinfo",	/* name */
+	"sys.float_info",	/* name */
 	floatinfo__doc__,	/* doc */
 	floatinfo_fields,	/* fields */
 	11

Modified: python/branches/tk_and_idle_maintenance/PC/VC6/pythoncore.dsp
==============================================================================
--- python/branches/tk_and_idle_maintenance/PC/VC6/pythoncore.dsp	(original)
+++ python/branches/tk_and_idle_maintenance/PC/VC6/pythoncore.dsp	Sat Jun 20 00:11:15 2009
@@ -97,10 +97,6 @@
 # End Source File
 # Begin Source File
 
-SOURCE=..\..\Modules\_bytesio.c
-# End Source File
-# Begin Source File
-
 SOURCE=..\..\Modules\cjkcodecs\_codecs_cn.c
 # End Source File
 # Begin Source File
@@ -137,10 +133,6 @@
 # End Source File
 # Begin Source File
 
-SOURCE=..\..\Modules\_fileio.c
-# End Source File
-# Begin Source File
-
 SOURCE=..\..\Modules\_functoolsmodule.c
 # End Source File
 # Begin Source File
@@ -153,6 +145,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\Modules\_io\_iomodule.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\Modules\_json.c
 # End Source File
 # Begin Source File
@@ -237,6 +233,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\Modules\_io\bufferedio.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\Objects\bufferobject.c
 # End Source File
 # Begin Source File
@@ -245,6 +245,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\Modules\_io\bytesio.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\Objects\bytes_methods.c
 # End Source File
 # Begin Source File
@@ -345,6 +349,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\Modules\_io\fileio.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\Objects\fileobject.c
 # End Source File
 # Begin Source File
@@ -442,6 +450,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\Modules\_io\iobase.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\Modules\imageop.c
 # End Source File
 # Begin Source File
@@ -671,6 +683,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\Modules\_io\stringio.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\Objects\stringobject.c
 # End Source File
 # Begin Source File
@@ -699,6 +715,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\Modules\_io\textio.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\Python\thread.c
 # End Source File
 # Begin Source File

Modified: python/branches/tk_and_idle_maintenance/PC/VS7.1/pythoncore.vcproj
==============================================================================
--- python/branches/tk_and_idle_maintenance/PC/VS7.1/pythoncore.vcproj	(original)
+++ python/branches/tk_and_idle_maintenance/PC/VS7.1/pythoncore.vcproj	Sat Jun 20 00:11:15 2009
@@ -362,18 +362,12 @@
 			RelativePath="..\..\Modules\cjkcodecs\_codecs_tw.c">
 		</File>
 		<File
-			RelativePath="..\..\Modules\_bytesio.c">
-		</File>
-		<File
 			RelativePath="..\..\Modules\_codecsmodule.c">
 		</File>
 		<File
 			RelativePath="..\..\Modules\_csv.c">
 		</File>
 		<File
-			RelativePath="..\..\Modules\_fileio.c">
-		</File>
-		<File
 			RelativePath="..\..\Modules\_functoolsmodule.c">
 		</File>
 		<File
@@ -383,6 +377,9 @@
 			RelativePath="..\..\Modules\_hotshot.c">
 		</File>
 		<File
+			RelativePath="..\..\Modules\_io\_iomodule.c">
+		</File>
+		<File
 			RelativePath="..\..\Modules\_json.c">
 		</File>
 		<File
@@ -443,12 +440,18 @@
 			RelativePath="..\..\Objects\boolobject.c">
 		</File>
 		<File
+			RelativePath="..\..\Modules\_io\bufferedio.c">
+		</File>
+		<File
 			RelativePath="..\..\Objects\bufferobject.c">
 		</File>
 		<File
 			RelativePath="..\..\Objects\bytearrayobject.c">
 		</File>
 		<File
+			RelativePath="..\..\Modules\_io\bytesio.c">
+		</File>
+		<File
 			RelativePath="..\..\Objects\stringobject.c">
 		</File>
 		<File
@@ -524,6 +527,9 @@
 			RelativePath="..\..\Objects\exceptions.c">
 		</File>
 		<File
+			RelativePath="..\..\Modules\_io\fileio.c">
+		</File>
+		<File
 			RelativePath="..\..\Objects\fileobject.c">
 		</File>
 		<File
@@ -629,6 +635,9 @@
 			RelativePath="..\..\Objects\intobject.c">
 		</File>
 		<File
+			RelativePath="..\..\Modules\_io\iobase.c">
+		</File>
+		<File
 			RelativePath="..\..\Objects\iterobject.c">
 		</File>
 		<File
@@ -773,6 +782,9 @@
 			RelativePath="..\..\Objects\sliceobject.c">
 		</File>
 		<File
+			RelativePath="..\..\Modules\_io\stringio.c">
+		</File>
+		<File
 			RelativePath="..\..\Modules\stropmodule.c">
 		</File>
 		<File
@@ -791,6 +803,9 @@
 			RelativePath="..\..\Python\sysmodule.c">
 		</File>
 		<File
+			RelativePath="..\..\Modules\_io\textio.c">
+		</File>
+		<File
 			RelativePath="..\..\Python\thread.c">
 		</File>
 		<File

Modified: python/branches/tk_and_idle_maintenance/PC/VS8.0/pythoncore.vcproj
==============================================================================
--- python/branches/tk_and_idle_maintenance/PC/VS8.0/pythoncore.vcproj	(original)
+++ python/branches/tk_and_idle_maintenance/PC/VS8.0/pythoncore.vcproj	Sat Jun 20 00:11:15 2009
@@ -999,14 +999,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\Modules\_fileio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\Modules\_bytesio.c"
-				>
-			</File>
-			<File
 				RelativePath="..\..\Modules\_functoolsmodule.c"
 				>
 			</File>
@@ -1350,6 +1342,42 @@
 					>
 				</File>
 			</Filter>
+			<Filter
+				Name="_io"
+				>
+				<File
+					RelativePath="..\..\Modules\_io\_iomodule.c"
+					>
+				</File>
+				<File
+					RelativePath="..\..\Modules\_io\_iomodule.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\Modules\_io\bufferedio.c"
+					>
+				</File>
+				<File
+					RelativePath="..\..\Modules\_io\bytesio.c"
+					>
+				</File>
+				<File
+					RelativePath="..\..\Modules\_io\fileio.c"
+					>
+				</File>
+				<File
+					RelativePath="..\..\Modules\_io\iobase.c"
+					>
+				</File>
+				<File
+					RelativePath="..\..\Modules\_io\stringio.c"
+					>
+				</File>
+				<File
+					RelativePath="..\..\Modules\_io\textio.c"
+					>
+				</File>
+			</Filter>
 		</Filter>
 		<Filter
 			Name="Objects"

Modified: python/branches/tk_and_idle_maintenance/PC/_winreg.c
==============================================================================
--- python/branches/tk_and_idle_maintenance/PC/_winreg.c	(original)
+++ python/branches/tk_and_idle_maintenance/PC/_winreg.c	Sat Jun 20 00:11:15 2009
@@ -469,9 +469,23 @@
 	PyHKEY_unaryFailureFunc,	/* nb_hex */
 };
 
+static PyObject *PyHKEY_CloseMethod(PyObject *self, PyObject *args);
+static PyObject *PyHKEY_DetachMethod(PyObject *self, PyObject *args);
+static PyObject *PyHKEY_Enter(PyObject *self);
+static PyObject *PyHKEY_Exit(PyObject *self, PyObject *args);
 
-/* fwd declare __getattr__ */
-static PyObject *PyHKEY_getattr(PyObject *self, const char *name);
+static struct PyMethodDef PyHKEY_methods[] = {
+	{"Close",  PyHKEY_CloseMethod, METH_VARARGS, PyHKEY_Close_doc},
+	{"Detach", PyHKEY_DetachMethod, METH_VARARGS, PyHKEY_Detach_doc},
+	{"__enter__", (PyCFunction)PyHKEY_Enter, METH_NOARGS, NULL},
+	{"__exit__", PyHKEY_Exit, METH_VARARGS, NULL},
+	{NULL}
+};
+
+static PyMemberDef PyHKEY_memberlist[] = {
+	{"handle", T_PYSSIZET, offsetof(PyHKEYObject, hkey), READONLY},
+	{NULL}    /* Sentinel */
+};
 
 /* The type itself */
 PyTypeObject PyHKEY_Type =
@@ -482,7 +496,7 @@
 	0,
 	PyHKEY_deallocFunc,		/* tp_dealloc */
 	PyHKEY_printFunc,		/* tp_print */
-	PyHKEY_getattr,			/* tp_getattr */
+	0,				/* tp_getattr */
 	0,				/* tp_setattr */
 	PyHKEY_compareFunc,		/* tp_compare */
 	0,				/* tp_repr */
@@ -495,15 +509,16 @@
 	0,				/* tp_getattro */
 	0,				/* tp_setattro */
 	0,				/* tp_as_buffer */
-	0,				/* tp_flags */
+	Py_TPFLAGS_DEFAULT,		/* tp_flags */
 	PyHKEY_doc,			/* tp_doc */
-};
-
-#define OFF(e) offsetof(PyHKEYObject, e)
-
-static struct memberlist PyHKEY_memberlist[] = {
-	{"handle",      T_INT,      OFF(hkey)},
-	{NULL}    /* Sentinel */
+	0,				/* tp_traverse */
+	0,				/* tp_clear */
+	0,				/* tp_richcompare */
+	0,				/* tp_weaklistoffset */
+	0,				/* tp_iter */
+	0,				/* tp_iternext */
+	PyHKEY_methods,			/* tp_methods */
+	PyHKEY_memberlist,		/* tp_members */
 };
 
 /************************************************************************
@@ -550,28 +565,6 @@
 }
 
 
-static struct PyMethodDef PyHKEY_methods[] = {
-	{"Close",  PyHKEY_CloseMethod, METH_VARARGS, PyHKEY_Close_doc},
-	{"Detach", PyHKEY_DetachMethod, METH_VARARGS, PyHKEY_Detach_doc},
-	{"__enter__", (PyCFunction)PyHKEY_Enter, METH_NOARGS, NULL},
-	{"__exit__", PyHKEY_Exit, METH_VARARGS, NULL},
-	{NULL}
-};
-
-/*static*/ PyObject *
-PyHKEY_getattr(PyObject *self, const char *name)
-{
-	PyObject *res;
-
-	res = Py_FindMethod(PyHKEY_methods, self, name);
-	if (res != NULL)
-		return res;
-	PyErr_Clear();
-	if (strcmp(name, "handle") == 0)
-		return PyLong_FromVoidPtr(((PyHKEYObject *)self)->hkey);
-	return PyMember_Get((char *)self, PyHKEY_memberlist, name);
-}
-
 /************************************************************************
    The public PyHKEY API (well, not public yet :-)
 ************************************************************************/
@@ -1634,7 +1627,8 @@
 	if (m == NULL)
 		return;
 	d = PyModule_GetDict(m);
-	PyHKEY_Type.ob_type = &PyType_Type;
+	if (PyType_Ready(&PyHKEY_Type) < 0)
+		return;
 	PyHKEY_Type.tp_doc = PyHKEY_doc;
 	Py_INCREF(&PyHKEY_Type);
 	if (PyDict_SetItemString(d, "HKEYType",

Modified: python/branches/tk_and_idle_maintenance/PC/config.c
==============================================================================
--- python/branches/tk_and_idle_maintenance/PC/config.c	(original)
+++ python/branches/tk_and_idle_maintenance/PC/config.c	Sat Jun 20 00:11:15 2009
@@ -52,8 +52,6 @@
 extern void init_winreg(void);
 extern void init_struct(void);
 extern void initdatetime(void);
-extern void init_fileio(void);
-extern void init_bytesio(void);
 extern void init_functools(void);
 extern void init_json(void);
 extern void initzlib(void);
@@ -68,6 +66,7 @@
 extern void init_subprocess(void);
 extern void init_lsprof(void);
 extern void init_ast(void);
+extern void init_io(void);
 extern void _PyWarnings_Init(void);
 
 /* tools/freeze/makeconfig.py marker for additional "extern" */
@@ -132,8 +131,6 @@
 	{"_winreg", init_winreg},
 	{"_struct", init_struct},
 	{"datetime", initdatetime},
-	{"_fileio", init_fileio},
-	{"_bytesio", init_bytesio},
 	{"_functools", init_functools},
 	{"_json", init_json},
 
@@ -166,6 +163,8 @@
 	{"exceptions", NULL},
         {"_warnings", _PyWarnings_Init},
 
+        {"_io", init_io},
+
         /* Sentinel */
         {0, 0}
 };

Modified: python/branches/tk_and_idle_maintenance/PCbuild/pythoncore.vcproj
==============================================================================
--- python/branches/tk_and_idle_maintenance/PCbuild/pythoncore.vcproj	(original)
+++ python/branches/tk_and_idle_maintenance/PCbuild/pythoncore.vcproj	Sat Jun 20 00:11:15 2009
@@ -999,14 +999,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\Modules\_fileio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\Modules\_bytesio.c"
-				>
-			</File>
-			<File
 				RelativePath="..\Modules\_functoolsmodule.c"
 				>
 			</File>
@@ -1350,6 +1342,42 @@
 					>
 				</File>
 			</Filter>
+			<Filter
+				Name="_io"
+				>
+				<File
+					RelativePath="..\Modules\_io\_iomodule.c"
+					>
+				</File>
+				<File
+					RelativePath="..\Modules\_io\_iomodule.h"
+					>
+				</File>
+				<File
+					RelativePath="..\Modules\_io\bufferedio.c"
+					>
+				</File>
+				<File
+					RelativePath="..\Modules\_io\bytesio.c"
+					>
+				</File>
+				<File
+					RelativePath="..\Modules\_io\fileio.c"
+					>
+				</File>
+				<File
+					RelativePath="..\Modules\_io\iobase.c"
+					>
+				</File>
+				<File
+					RelativePath="..\Modules\_io\stringio.c"
+					>
+				</File>
+				<File
+					RelativePath="..\Modules\_io\textio.c"
+					>
+				</File>
+			</Filter>
 		</Filter>
 		<Filter
 			Name="Objects"

Modified: python/branches/tk_and_idle_maintenance/Parser/Python.asdl
==============================================================================
--- python/branches/tk_and_idle_maintenance/Parser/Python.asdl	(original)
+++ python/branches/tk_and_idle_maintenance/Parser/Python.asdl	Sat Jun 20 00:11:15 2009
@@ -34,7 +34,7 @@
 	      | Assert(expr test, expr? msg)
 
 	      | Import(alias* names)
-	      | ImportFrom(identifier module, alias* names, int? level)
+	      | ImportFrom(identifier? module, alias* names, int? level)
 
 	      -- Doesn't capture requirement that locals must be
 	      -- defined if globals is

Modified: python/branches/tk_and_idle_maintenance/Parser/asdl.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Parser/asdl.py	(original)
+++ python/branches/tk_and_idle_maintenance/Parser/asdl.py	Sat Jun 20 00:11:15 2009
@@ -10,14 +10,12 @@
 Changes for Python: Add support for module versions
 """
 
-#__metaclass__ = type
-
 import os
 import traceback
 
 import spark
 
-class Token:
+class Token(object):
     # spark seems to dispatch in the parser based on a token's
     # type attribute
     def __init__(self, type, lineno):
@@ -45,7 +43,7 @@
         self.value = value
         self.lineno = lineno
 
-class ASDLSyntaxError:
+class ASDLSyntaxError(Exception):
 
     def __init__(self, lineno, token=None, msg=None):
         self.lineno = lineno
@@ -206,19 +204,19 @@
 
     def p_field_2(self, (type, _, name)):
         " field ::= Id * Id "
-        return Field(type, name, seq=1)
+        return Field(type, name, seq=True)
 
     def p_field_3(self, (type, _, name)):
         " field ::= Id ? Id "
-        return Field(type, name, opt=1)
+        return Field(type, name, opt=True)
 
     def p_field_4(self, (type, _)):
         " field ::= Id * "
-        return Field(type, seq=1)
+        return Field(type, seq=True)
 
     def p_field_5(self, (type, _)):
         " field ::= Id ? "
-        return Field(type, opt=1)
+        return Field(type, opt=True)
 
 builtin_types = ("identifier", "string", "int", "bool", "object")
 
@@ -226,7 +224,7 @@
 # not sure if any of the methods are useful yet, but I'm adding them
 # piecemeal as they seem helpful
 
-class AST:
+class AST(object):
     pass # a marker class
 
 class Module(AST):
@@ -258,7 +256,7 @@
         return "Constructor(%s, %s)" % (self.name, self.fields)
 
 class Field(AST):
-    def __init__(self, type, name=None, seq=0, opt=0):
+    def __init__(self, type, name=None, seq=False, opt=False):
         self.type = type
         self.name = name
         self.seq = seq
@@ -266,9 +264,9 @@
 
     def __repr__(self):
         if self.seq:
-            extra = ", seq=1"
+            extra = ", seq=True"
         elif self.opt:
-            extra = ", opt=1"
+            extra = ", opt=True"
         else:
             extra = ""
         if self.name is None:
@@ -296,7 +294,7 @@
 
 class VisitorBase(object):
 
-    def __init__(self, skip=0):
+    def __init__(self, skip=False):
         self.cache = {}
         self.skip = skip
 
@@ -331,7 +329,7 @@
 class Check(VisitorBase):
 
     def __init__(self):
-        super(Check, self).__init__(skip=1)
+        super(Check, self).__init__(skip=True)
         self.cons = {}
         self.errors = 0
         self.types = {}
@@ -373,7 +371,7 @@
     v.visit(mod)
 
     for t in v.types:
-        if not mod.types.has_key(t) and not t in builtin_types:
+        if t not in mod.types and not t in builtin_types:
             v.errors += 1
             uses = ", ".join(v.types[t])
             print "Undefined type %s, used in %s" % (t, uses)

Modified: python/branches/tk_and_idle_maintenance/Parser/asdl_c.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Parser/asdl_c.py	(original)
+++ python/branches/tk_and_idle_maintenance/Parser/asdl_c.py	Sat Jun 20 00:11:15 2009
@@ -86,7 +86,7 @@
         self.file = file
         super(EmitVisitor, self).__init__()
 
-    def emit(self, s, depth, reflow=1):
+    def emit(self, s, depth, reflow=True):
         # XXX reflow long lines?
         if reflow:
             lines = reflow_lines(s, depth)
@@ -255,7 +255,7 @@
         ctype = get_c_type(type)
         self.emit_function(cons.name, ctype, args, attrs)
 
-    def emit_function(self, name, ctype, args, attrs, union=1):
+    def emit_function(self, name, ctype, args, attrs, union=True):
         args = args + attrs
         if args:
             argstr = ", ".join(["%s %s" % (atype, aname)
@@ -267,19 +267,19 @@
         for i in range(1, len(args)+1):
             margs += ", a%d" % i
         self.emit("#define %s(%s) _Py_%s(%s)" % (name, margs, name, margs), 0,
-                reflow = 0)
-        self.emit("%s _Py_%s(%s);" % (ctype, name, argstr), 0)
+                reflow=False)
+        self.emit("%s _Py_%s(%s);" % (ctype, name, argstr), False)
 
     def visitProduct(self, prod, name):
         self.emit_function(name, get_c_type(name),
-                           self.get_args(prod.fields), [], union=0)
+                           self.get_args(prod.fields), [], union=False)
 
 
 class FunctionVisitor(PrototypeVisitor):
     """Visitor to generate constructor functions for AST."""
 
-    def emit_function(self, name, ctype, args, attrs, union=1):
-        def emit(s, depth=0, reflow=1):
+    def emit_function(self, name, ctype, args, attrs, union=True):
+        def emit(s, depth=0, reflow=True):
             self.emit(s, depth, reflow)
         argstr = ", ".join(["%s %s" % (atype, aname)
                             for atype, aname, opt in args + attrs])
@@ -298,7 +298,7 @@
                 emit("PyErr_SetString(PyExc_ValueError,", 2)
                 msg = "field %s is required for %s" % (argname, name)
                 emit('                "%s");' % msg,
-                     2, reflow=0)
+                     2, reflow=False)
                 emit('return NULL;', 2)
                 emit('}', 1)
 
@@ -314,7 +314,7 @@
         emit("")
 
     def emit_body_union(self, name, args, attrs):
-        def emit(s, depth=0, reflow=1):
+        def emit(s, depth=0, reflow=True):
             self.emit(s, depth, reflow)
         emit("p->kind = %s_kind;" % name, 1)
         for argtype, argname, opt in args:
@@ -323,7 +323,7 @@
             emit("p->%s = %s;" % (argname, argname), 1)
 
     def emit_body_struct(self, name, args, attrs):
-        def emit(s, depth=0, reflow=1):
+        def emit(s, depth=0, reflow=True):
             self.emit(s, depth, reflow)
         for argtype, argname, opt in args:
             emit("p->%s = %s;" % (argname, argname), 1)

Deleted: python/branches/tk_and_idle_maintenance/Parser/grammar.mak
==============================================================================
--- python/branches/tk_and_idle_maintenance/Parser/grammar.mak	Sat Jun 20 00:11:15 2009
+++ (empty file)
@@ -1,45 +0,0 @@
-# This manages to rebuild graminit.{h, c} under MSVC 6 (Windows), via
-#
-#     nmake /f grammar.mak
-#
-# You may also need to copy python23.dll into this directory, or get
-# it on your search path.
-#
-# The intermediate files can be nuked afterwards:
-#
-#     nmake /f grammar.mak clean
-#
-# I don't understand the maze of preprocessor #define's on Windows, and
-# as a result this requires linking with python23.lib, so it's of no use
-# for bootstrapping (the cause appears to be a useless-- in this
-# particular case --pragma in PC\pyconfig.h, which demands that
-# python23.lib get linked in).
-
-LIBS= ..\PCbuild\python25.lib
-
-CFLAGS= /I ..\Include /I ..\PC /D MS_NO_COREDLL /D PGEN /MD
-
-GRAMMAR_H= ..\Include\graminit.h
-GRAMMAR_C= ..\Python\graminit.c
-GRAMMAR_INPUT= ..\Grammar\Grammar
-
-PGEN= pgen.exe
-
-POBJS= acceler.obj grammar1.obj listnode.obj node.obj parser.obj \
-       parsetok.obj tokenizer.obj bitset.obj metagrammar.obj
-
-PARSER_OBJS= $(POBJS) myreadline.obj
-
-PGOBJS= firstsets.obj grammar.obj pgen.obj printgrammar.obj pgenmain.obj
-
-PGENOBJS= $(POBJS) $(PGOBJS)
-
-$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
-		$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-
-$(PGEN):	$(PGENOBJS)
-		$(CC) $(PGENOBJS) $(LIBS) /Fe$(PGEN)
-
-clean:
-        del *.obj
-        del $(PGEN)

Modified: python/branches/tk_and_idle_maintenance/Parser/tokenizer.c
==============================================================================
--- python/branches/tk_and_idle_maintenance/Parser/tokenizer.c	(original)
+++ python/branches/tk_and_idle_maintenance/Parser/tokenizer.c	Sat Jun 20 00:11:15 2009
@@ -619,11 +619,8 @@
 	if (tok->enc != NULL) {
 		assert(utf8 == NULL);
 		utf8 = translate_into_utf8(str, tok->enc);
-		if (utf8 == NULL) {
-			PyErr_Format(PyExc_SyntaxError,
-				"unknown encoding: %s", tok->enc);
+		if (utf8 == NULL)
 			return error_ret(tok);
-		}
 		str = PyString_AsString(utf8);
 	}
 #endif

Modified: python/branches/tk_and_idle_maintenance/Python/Python-ast.c
==============================================================================
--- python/branches/tk_and_idle_maintenance/Python/Python-ast.c	(original)
+++ python/branches/tk_and_idle_maintenance/Python/Python-ast.c	Sat Jun 20 00:11:15 2009
@@ -2,7 +2,7 @@
 
 
 /*
-   __version__ 62047.
+   __version__ 73421.
 
    This module must be committed separately after each AST grammar change;
    The __version__ number is set to the revision number of the commit
@@ -1330,11 +1330,6 @@
            col_offset, PyArena *arena)
 {
         stmt_ty p;
-        if (!module) {
-                PyErr_SetString(PyExc_ValueError,
-                                "field module is required for ImportFrom");
-                return NULL;
-        }
         p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
         if (!p)
                 return NULL;
@@ -4273,8 +4268,7 @@
                         Py_XDECREF(tmp);
                         tmp = NULL;
                 } else {
-                        PyErr_SetString(PyExc_TypeError, "required field \"module\" missing from ImportFrom");
-                        return 1;
+                        module = NULL;
                 }
                 if (PyObject_HasAttrString(obj, "names")) {
                         int res;
@@ -5950,7 +5944,7 @@
         if (PyDict_SetItemString(d, "AST", (PyObject*)&AST_type) < 0) return;
         if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0)
                 return;
-        if (PyModule_AddStringConstant(m, "__version__", "62047") < 0)
+        if (PyModule_AddStringConstant(m, "__version__", "73421") < 0)
                 return;
         if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return;
         if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0)

Modified: python/branches/tk_and_idle_maintenance/Python/ast.c
==============================================================================
--- python/branches/tk_and_idle_maintenance/Python/ast.c	(original)
+++ python/branches/tk_and_idle_maintenance/Python/ast.c	Sat Jun 20 00:11:15 2009
@@ -402,10 +402,13 @@
             s = e->v.List.elts;
             break;
         case Tuple_kind:
-            if (asdl_seq_LEN(e->v.Tuple.elts) == 0) 
-                return ast_error(n, "can't assign to ()");
-            e->v.Tuple.ctx = ctx;
-            s = e->v.Tuple.elts;
+            if (asdl_seq_LEN(e->v.Tuple.elts))  {
+                e->v.Tuple.ctx = ctx;
+                s = e->v.Tuple.elts;
+            }
+            else {
+                expr_name = "()";
+            }
             break;
         case Lambda_kind:
             expr_name = "lambda";
@@ -1347,9 +1350,6 @@
         if (TYPE(ch) == yield_expr)
             return ast_for_expr(c, ch);
         
-        if ((NCH(ch) > 1) && (TYPE(CHILD(ch, 1)) == gen_for))
-            return ast_for_genexp(c, ch);
-        
         return ast_for_testlist_gexp(c, ch);
     case LSQB: /* list (or list comprehension) */
         ch = CHILD(n, 1);
@@ -1471,14 +1471,7 @@
 
     ch = CHILD(n, NCH(n) - 1);
     if (TYPE(ch) == sliceop) {
-        if (NCH(ch) == 1) {
-            /* No expression, so step is None */
-            ch = CHILD(ch, 0);
-            step = Name(new_identifier("None", c->c_arena), Load,
-                        LINENO(ch), ch->n_col_offset, c->c_arena);
-            if (!step)
-                return NULL;
-        } else {
+        if (NCH(ch) != 1) {
             ch = CHILD(ch, 1);
             if (TYPE(ch) == test) {
                 step = ast_for_expr(c, ch);
@@ -2088,31 +2081,6 @@
         expr1 = ast_for_testlist(c, ch);
         if (!expr1)
             return NULL;
-        /* TODO(nas): Remove duplicated error checks (set_context does it) */
-        switch (expr1->kind) {
-            case GeneratorExp_kind:
-                ast_error(ch, "augmented assignment to generator "
-                          "expression not possible");
-                return NULL;
-            case Yield_kind:
-                ast_error(ch, "augmented assignment to yield "
-                          "expression not possible");
-                return NULL;
-            case Name_kind: {
-                const char *var_name = PyBytes_AS_STRING(expr1->v.Name.id);
-                if ((var_name[0] == 'N' || var_name[0] == 'T' || var_name[0] == 'F') &&
-                    !forbidden_check(c, ch, var_name))
-                    return NULL;
-                break;
-            }
-            case Attribute_kind:
-            case Subscript_kind:
-                break;
-            default:
-                ast_error(ch, "illegal expression for augmented "
-                          "assignment");
-                return NULL;
-        }
         if(!set_context(c, expr1, Store, ch))
             return NULL;
 
@@ -2179,9 +2147,9 @@
                              | '>>' test [ (',' test)+ [','] ] )
      */
     expr_ty dest = NULL, expression;
-    asdl_seq *seq;
+    asdl_seq *seq = NULL;
     bool nl;
-    int i, j, start = 1;
+    int i, j, values_count, start = 1;
 
     REQ(n, print_stmt);
     if (NCH(n) >= 2 && TYPE(CHILD(n, 1)) == RIGHTSHIFT) {
@@ -2190,14 +2158,17 @@
             return NULL;
             start = 4;
     }
-    seq = asdl_seq_new((NCH(n) + 1 - start) / 2, c->c_arena);
-    if (!seq)
-        return NULL;
-    for (i = start, j = 0; i < NCH(n); i += 2, ++j) {
-        expression = ast_for_expr(c, CHILD(n, i));
-        if (!expression)
+    values_count = (NCH(n) + 1 - start) / 2;
+    if (values_count) {
+        seq = asdl_seq_new(values_count, c->c_arena);
+        if (!seq)
             return NULL;
-        asdl_seq_SET(seq, j, expression);
+        for (i = start, j = 0; i < NCH(n); i += 2, ++j) {
+            expression = ast_for_expr(c, CHILD(n, i));
+            if (!expression)
+                return NULL;
+            asdl_seq_SET(seq, j, expression);
+        }
     }
     nl = (TYPE(CHILD(n, NCH(n) - 1)) == COMMA) ? false : true;
     return Print(dest, seq, nl, LINENO(n), n->n_col_offset, c->c_arena);
@@ -2329,7 +2300,7 @@
 }
 
 static alias_ty
-alias_for_import_name(struct compiling *c, const node *n)
+alias_for_import_name(struct compiling *c, const node *n, int store)
 {
     /*
       import_as_name: NAME ['as' NAME]
@@ -2340,28 +2311,40 @@
 
  loop:
     switch (TYPE(n)) {
-        case import_as_name:
+         case import_as_name: {
+            node *name_node = CHILD(n, 0);
             str = NULL;
             if (NCH(n) == 3) {
-                str = NEW_IDENTIFIER(CHILD(n, 2));
+                node *str_node = CHILD(n, 2);
+                if (store && !forbidden_check(c, str_node, STR(str_node)))
+                    return NULL;
+                str = NEW_IDENTIFIER(str_node);
                 if (!str)
                     return NULL;
             }
-            name = NEW_IDENTIFIER(CHILD(n, 0));
+            else {
+                if (!forbidden_check(c, name_node, STR(name_node)))
+                    return NULL;
+            }
+            name = NEW_IDENTIFIER(name_node);
             if (!name)
                 return NULL;
             return alias(name, str, c->c_arena);
+        }
         case dotted_as_name:
             if (NCH(n) == 1) {
                 n = CHILD(n, 0);
                 goto loop;
             }
             else {
-                alias_ty a = alias_for_import_name(c, CHILD(n, 0));
+                node *asname_node = CHILD(n, 2);
+                alias_ty a = alias_for_import_name(c, CHILD(n, 0), 0);
                 if (!a)
                     return NULL;
                 assert(!a->asname);
-                a->asname = NEW_IDENTIFIER(CHILD(n, 2));
+                if (!forbidden_check(c, asname_node, STR(asname_node)))
+                    return NULL;
+                a->asname = NEW_IDENTIFIER(asname_node);
                 if (!a->asname)
                     return NULL;
                 return a;
@@ -2369,7 +2352,10 @@
             break;
         case dotted_name:
             if (NCH(n) == 1) {
-                name = NEW_IDENTIFIER(CHILD(n, 0));
+                node *name_node = CHILD(n, 0);
+                if (store && !forbidden_check(c, name_node, STR(name_node)))
+                    return NULL;
+                name = NEW_IDENTIFIER(name_node);
                 if (!name)
                     return NULL;
                 return alias(name, NULL, c->c_arena);
@@ -2443,7 +2429,7 @@
         if (!aliases)
             return NULL;
         for (i = 0; i < NCH(n); i += 2) {
-            alias_ty import_alias = alias_for_import_name(c, CHILD(n, i));
+            alias_ty import_alias = alias_for_import_name(c, CHILD(n, i), 1);
             if (!import_alias)
                 return NULL;
             asdl_seq_SET(aliases, i / 2, import_alias);
@@ -2454,13 +2440,15 @@
         int n_children;
         int idx, ndots = 0;
         alias_ty mod = NULL;
-        identifier modname;
+        identifier modname = NULL;
         
        /* Count the number of dots (for relative imports) and check for the
           optional module name */
         for (idx = 1; idx < NCH(n); idx++) {
             if (TYPE(CHILD(n, idx)) == dotted_name) {
-                mod = alias_for_import_name(c, CHILD(n, idx));
+                mod = alias_for_import_name(c, CHILD(n, idx), 0);
+                if (!mod)
+                    return NULL;
                 idx++;
                 break;
             } else if (TYPE(CHILD(n, idx)) != DOT) {
@@ -2501,14 +2489,14 @@
 
         /* handle "from ... import *" special b/c there's no children */
         if (TYPE(n) == STAR) {
-            alias_ty import_alias = alias_for_import_name(c, n);
+            alias_ty import_alias = alias_for_import_name(c, n, 1);
             if (!import_alias)
                 return NULL;
                 asdl_seq_SET(aliases, 0, import_alias);
         }
         else {
             for (i = 0; i < NCH(n); i += 2) {
-                alias_ty import_alias = alias_for_import_name(c, CHILD(n, i));
+                alias_ty import_alias = alias_for_import_name(c, CHILD(n, i), 1);
                 if (!import_alias)
                     return NULL;
                     asdl_seq_SET(aliases, i / 2, import_alias);
@@ -2516,8 +2504,6 @@
         }
         if (mod != NULL)
             modname = mod->name;
-        else
-            modname = new_identifier("", c->c_arena);
         return ImportFrom(modname, aliases, ndots, lineno, col_offset,
                           c->c_arena);
     }
@@ -3130,7 +3116,6 @@
         n = CHILD(n, 0);
     }
     if (TYPE(n) == small_stmt) {
-        REQ(n, small_stmt);
         n = CHILD(n, 0);
         /* small_stmt: expr_stmt | print_stmt  | del_stmt | pass_stmt
                      | flow_stmt | import_stmt | global_stmt | exec_stmt

Modified: python/branches/tk_and_idle_maintenance/Python/compile.c
==============================================================================
--- python/branches/tk_and_idle_maintenance/Python/compile.c	(original)
+++ python/branches/tk_and_idle_maintenance/Python/compile.c	Sat Jun 20 00:11:15 2009
@@ -140,7 +140,6 @@
 
 	struct compiler_unit *u; /* compiler state for current block */
 	PyObject *c_stack;	 /* Python list holding compiler_unit ptrs */
-	char *c_encoding;	 /* source encoding (a borrowed reference) */
 	PyArena *c_arena;	 /* pointer to memory allocation arena */
 };
 
@@ -282,9 +281,6 @@
 		goto finally;
 	}
 
-	/* XXX initialize to NULL for now, need to handle */
-	c.c_encoding = NULL;
-
 	co = compiler_mod(&c, mod);
 
  finally:
@@ -1976,6 +1972,13 @@
 
 	PyObject *names = PyTuple_New(n);
 	PyObject *level;
+	static PyObject *empty_string;
+
+	if (!empty_string) {
+		empty_string = PyString_FromString("");
+		if (!empty_string)
+			return 0;
+	}
 	
 	if (!names)
 		return 0;
@@ -1998,23 +2001,24 @@
 		PyTuple_SET_ITEM(names, i, alias->name);
 	}
 
-	if (s->lineno > c->c_future->ff_lineno) {
-		if (!strcmp(PyString_AS_STRING(s->v.ImportFrom.module),
-			    "__future__")) {
-			Py_DECREF(level);
-			Py_DECREF(names);
-			return compiler_error(c, 
-				      "from __future__ imports must occur "
+	if (s->lineno > c->c_future->ff_lineno && s->v.ImportFrom.module && 
+	    !strcmp(PyString_AS_STRING(s->v.ImportFrom.module), "__future__")) {
+		Py_DECREF(level);
+		Py_DECREF(names);
+		return compiler_error(c, "from __future__ imports must occur "
 				      "at the beginning of the file");
-
-		}
 	}
 
 	ADDOP_O(c, LOAD_CONST, level, consts);
 	Py_DECREF(level);
 	ADDOP_O(c, LOAD_CONST, names, consts);
 	Py_DECREF(names);
-	ADDOP_NAME(c, IMPORT_NAME, s->v.ImportFrom.module, names);
+	if (s->v.ImportFrom.module) {
+		ADDOP_NAME(c, IMPORT_NAME, s->v.ImportFrom.module, names);
+	}
+	else {
+		ADDOP_NAME(c, IMPORT_NAME, empty_string, names);
+	}
 	for (i = 0; i < n; i++) {
 		alias_ty alias = (alias_ty)asdl_seq_GET(s->v.ImportFrom.names, i);
 		identifier store_name;

Modified: python/branches/tk_and_idle_maintenance/Python/errors.c
==============================================================================
--- python/branches/tk_and_idle_maintenance/Python/errors.c	(original)
+++ python/branches/tk_and_idle_maintenance/Python/errors.c	Sat Jun 20 00:11:15 2009
@@ -371,7 +371,7 @@
 
 
 PyObject *
-PyErr_SetFromErrnoWithFilename(PyObject *exc, char *filename)
+PyErr_SetFromErrnoWithFilename(PyObject *exc, const char *filename)
 {
 	PyObject *name = filename ? PyString_FromString(filename) : NULL;
 	PyObject *result = PyErr_SetFromErrnoWithFilenameObject(exc, name);
@@ -381,7 +381,7 @@
 
 #ifdef MS_WINDOWS
 PyObject *
-PyErr_SetFromErrnoWithUnicodeFilename(PyObject *exc, Py_UNICODE *filename)
+PyErr_SetFromErrnoWithUnicodeFilename(PyObject *exc, const Py_UNICODE *filename)
 {
 	PyObject *name = filename ?
 	                 PyUnicode_FromUnicode(filename, wcslen(filename)) :

Modified: python/branches/tk_and_idle_maintenance/Tools/msi/msi.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Tools/msi/msi.py	(original)
+++ python/branches/tk_and_idle_maintenance/Tools/msi/msi.py	Sat Jun 20 00:11:15 2009
@@ -119,7 +119,10 @@
 if micro:
     docfile = str(micro)
 if level < 0xf:
-    docfile = '%x%s' % (level, serial)
+    if level == 0xC:
+        docfile = "rc%s" % (serial,)
+    else:
+        docfile = '%x%s' % (level, serial)
 docfile = 'python%s%s%s.chm' % (major, minor, docfile)
 
 # Build the mingw import library, libpythonXY.a

Modified: python/branches/tk_and_idle_maintenance/configure
==============================================================================
--- python/branches/tk_and_idle_maintenance/configure	(original)
+++ python/branches/tk_and_idle_maintenance/configure	Sat Jun 20 00:11:15 2009
@@ -1,12 +1,12 @@
 #! /bin/sh
-# From configure.in Revision: 72871 .
+# From configure.in Revision: 72898 .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for python 2.7.
+# Generated by GNU Autoconf 2.61 for python 2.7.
 #
 # Report bugs to <http://bugs.python.org/>.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 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.
 ## --------------------- ##
@@ -18,7 +18,7 @@
 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
+  # 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
@@ -40,45 +40,17 @@
 as_cr_digits='0123456789'
 as_cr_alnum=$as_cr_Letters$as_cr_digits
 
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
+  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
 
 # Support unset when possible.
@@ -94,6 +66,8 @@
 # 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.
@@ -116,7 +90,7 @@
   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
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
   { (exit 1); exit 1; }
 fi
 
@@ -129,10 +103,17 @@
 PS4='+ '
 
 # NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
+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
 
 # Required to use basename.
 if expr a : '\(a\)' >/dev/null 2>&1 &&
@@ -154,7 +135,7 @@
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
 	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+echo X/"$0" |
     sed '/^.*\/\([^/][^/]*\)\/*$/{
 	    s//\1/
 	    q
@@ -180,7 +161,7 @@
   as_have_required=no
 fi
 
-  if test $as_have_required = yes &&	 (eval ":
+  if test $as_have_required = yes && 	 (eval ":
 (as_func_return () {
   (exit \$1)
 }
@@ -262,7 +243,7 @@
 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
+  # 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
@@ -283,7 +264,7 @@
 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
+  # 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
@@ -363,10 +344,10 @@
 
       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+"$@"}
+        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+        done
+        export CONFIG_SHELL
+        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
 fi
 
 
@@ -435,10 +416,9 @@
 
 test \$exitcode = 0") || {
   echo No shell found that supports shell functions.
-  echo Please tell bug-autoconf at gnu.org about your system,
-  echo including any error possibly output before this message.
-  echo This can help us improve future autoconf versions.
-  echo Configuration will now proceed without shell functions.
+  echo Please tell autoconf at gnu.org about your system,
+  echo including any error possibly output before this
+  echo message
 }
 
 
@@ -474,7 +454,7 @@
       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
+    { 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
@@ -502,6 +482,7 @@
 *)
   ECHO_N='-n';;
 esac
+
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -514,22 +495,19 @@
   rm -f conf$$.dir/conf$$.file
 else
   rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
+  mkdir conf$$.dir
 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
+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'
-  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
 else
   as_ln_s='cp -p'
 fi
@@ -554,10 +532,10 @@
   as_test_x='
     eval sh -c '\''
       if test -d "$1"; then
-	test -d "$1/.";
+        test -d "$1/.";
       else
 	case $1 in
-	-*)set "./$1";;
+        -*)set "./$1";;
 	esac;
 	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
 	???[sx]*):;;*)false;;esac;fi
@@ -638,160 +616,128 @@
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='LTLIBOBJS
-SRCDIRS
-THREADHEADERS
-UNICODE_OBJS
-LIBC
-LIBM
-HAVE_GETHOSTBYNAME
-HAVE_GETHOSTBYNAME_R
-HAVE_GETHOSTBYNAME_R_3_ARG
-HAVE_GETHOSTBYNAME_R_5_ARG
-HAVE_GETHOSTBYNAME_R_6_ARG
-LIBOBJS
-TRUE
-MACHDEP_OBJS
-DYNLOADFILE
-DLINCLDIR
-THREADOBJ
-LDLAST
-USE_THREAD_MODULE
-SIGNAL_OBJS
-USE_SIGNAL_MODULE
-SHLIBS
-CFLAGSFORSHARED
-LINKFORSHARED
-CCSHARED
-BLDSHARED
-LDSHARED
-SO
-LIBTOOL_CRUFT
-OTHER_LIBTOOL_OPT
-UNIVERSAL_ARCH_FLAGS
-BASECFLAGS
-OPT
-LN
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-SVNVERSION
-ARFLAGS
-AR
-RANLIB
-GNULD
-LINKCC
-RUNSHARED
-INSTSONAME
-LDLIBRARYDIR
-BLDLIBRARY
-DLLLIBRARY
-LDLIBRARY
-LIBRARY
-BUILDEXEEXT
-EGREP
-GREP
-CPP
-MAINCC
-CXX
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-EXPORT_MACOSX_DEPLOYMENT_TARGET
-CONFIGURE_MACOSX_DEPLOYMENT_TARGET
-EXTRAMACHDEPPATH
-EXTRAPLATDIR
-SGI_ABI
-MACHDEP
-FRAMEWORKUNIXTOOLSPREFIX
-FRAMEWORKALTINSTALLLAST
-FRAMEWORKALTINSTALLFIRST
-FRAMEWORKINSTALLLAST
-FRAMEWORKINSTALLFIRST
-PYTHONFRAMEWORKINSTALLDIR
-PYTHONFRAMEWORKPREFIX
-PYTHONFRAMEWORKDIR
-PYTHONFRAMEWORKIDENTIFIER
-PYTHONFRAMEWORK
-ARCH_RUN_32BIT
-UNIVERSALSDK
-CONFIG_ARGS
-SOVERSION
-VERSION
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
+ac_subst_vars='SHELL
 PATH_SEPARATOR
-SHELL'
+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
+VERSION
+SOVERSION
+CONFIG_ARGS
+UNIVERSALSDK
+ARCH_RUN_32BIT
+PYTHONFRAMEWORK
+PYTHONFRAMEWORKIDENTIFIER
+PYTHONFRAMEWORKDIR
+PYTHONFRAMEWORKPREFIX
+PYTHONFRAMEWORKINSTALLDIR
+FRAMEWORKINSTALLFIRST
+FRAMEWORKINSTALLLAST
+FRAMEWORKALTINSTALLFIRST
+FRAMEWORKALTINSTALLLAST
+FRAMEWORKUNIXTOOLSPREFIX
+MACHDEP
+SGI_ABI
+EXTRAPLATDIR
+EXTRAMACHDEPPATH
+CONFIGURE_MACOSX_DEPLOYMENT_TARGET
+EXPORT_MACOSX_DEPLOYMENT_TARGET
+CC
+CFLAGS
+LDFLAGS
+CPPFLAGS
+ac_ct_CC
+EXEEXT
+OBJEXT
+CXX
+MAINCC
+CPP
+GREP
+EGREP
+BUILDEXEEXT
+LIBRARY
+LDLIBRARY
+DLLLIBRARY
+BLDLIBRARY
+LDLIBRARYDIR
+INSTSONAME
+RUNSHARED
+LINKCC
+GNULD
+RANLIB
+AR
+ARFLAGS
+SVNVERSION
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+LN
+OPT
+BASECFLAGS
+UNIVERSAL_ARCH_FLAGS
+OTHER_LIBTOOL_OPT
+LIBTOOL_CRUFT
+SO
+LDSHARED
+BLDSHARED
+CCSHARED
+LINKFORSHARED
+CFLAGSFORSHARED
+SHLIBS
+USE_SIGNAL_MODULE
+SIGNAL_OBJS
+USE_THREAD_MODULE
+LDLAST
+THREADOBJ
+DLINCLDIR
+DYNLOADFILE
+MACHDEP_OBJS
+TRUE
+LIBOBJS
+HAVE_GETHOSTBYNAME_R_6_ARG
+HAVE_GETHOSTBYNAME_R_5_ARG
+HAVE_GETHOSTBYNAME_R_3_ARG
+HAVE_GETHOSTBYNAME_R
+HAVE_GETHOSTBYNAME
+LIBM
+LIBC
+UNICODE_OBJS
+THREADHEADERS
+SRCDIRS
+LTLIBOBJS'
 ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-enable_universalsdk
-with_universal_archs
-with_framework_name
-enable_framework
-with_gcc
-with_cxx_main
-with_suffix
-enable_shared
-enable_profiling
-with_pydebug
-enable_toolbox_glue
-with_libs
-with_system_ffi
-with_dbmliborder
-with_signal_module
-with_dec_threads
-with_threads
-with_thread
-with_pth
-enable_ipv6
-with_doc_strings
-with_tsc
-with_pymalloc
-with_wctype_functions
-with_fpectl
-with_libm
-with_libc
-enable_big_digits
-enable_unicode
-'
       ac_precious_vars='build_alias
 host_alias
 target_alias
@@ -806,8 +752,6 @@
 # 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
@@ -906,21 +850,13 @@
     datarootdir=$ac_optarg ;;
 
   -disable-* | --disable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
    { (exit 1); exit 1; }; }
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=no ;;
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=no ;;
 
   -docdir | --docdir | --docdi | --doc | --do)
     ac_prev=docdir ;;
@@ -933,21 +869,13 @@
     dvidir=$ac_optarg ;;
 
   -enable-* | --enable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
    { (exit 1); exit 1; }; }
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=\$ac_optarg ;;
+    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+    eval enable_$ac_feature=\$ac_optarg ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -1138,38 +1066,22 @@
     ac_init_version=: ;;
 
   -with-* | --with-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
    { (exit 1); exit 1; }; }
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=\$ac_optarg ;;
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=\$ac_optarg ;;
 
   -without-* | --without-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
    { (exit 1); exit 1; }; }
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=no ;;
+    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+    eval with_$ac_package=no ;;
 
   --x)
     # Obsolete; use --with-x.
@@ -1189,7 +1101,7 @@
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
 Try \`$0 --help' for more information." >&2
    { (exit 1); exit 1; }; }
     ;;
@@ -1198,16 +1110,16 @@
     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
     # Reject names that are not valid shell variable names.
     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-      { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
    { (exit 1); exit 1; }; }
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
 
   *)
     # FIXME: should be removed in autoconf 3.0.
-    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    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
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
     ;;
 
@@ -1216,38 +1128,22 @@
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
+  { echo "$as_me: error: missing argument to $ac_option" >&2
    { (exit 1); exit 1; }; }
 fi
 
-if test -n "$ac_unrecognized_opts"; then
-  case $enable_option_checking in
-    no) ;;
-    fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
-   { (exit 1); exit 1; }; } ;;
-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
-  esac
-fi
-
-# Check all directory arguments for consistency.
+# Be sure to have absolute directory names.
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
 		libdir localedir mandir
 do
   eval ac_val=\$$ac_var
-  # Remove trailing slashes.
-  case $ac_val in
-    */ )
-      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
-      eval $ac_var=\$ac_val;;
-  esac
-  # Be sure to have absolute directory names.
   case $ac_val in
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
    { (exit 1); exit 1; }; }
 done
 
@@ -1262,7 +1158,7 @@
 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.
+    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
@@ -1278,10 +1174,10 @@
 ac_pwd=`pwd` && test -n "$ac_pwd" &&
 ac_ls_di=`ls -di .` &&
 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  { $as_echo "$as_me: error: working directory cannot be determined" >&2
+  { echo "$as_me: error: Working directory cannot be determined" >&2
    { (exit 1); exit 1; }; }
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
+  { echo "$as_me: error: pwd does not report name of working directory" >&2
    { (exit 1); exit 1; }; }
 
 
@@ -1289,12 +1185,12 @@
 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" |
+  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" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -1321,12 +1217,12 @@
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
    { (exit 1); exit 1; }; }
 fi
 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
 ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
+	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
    { (exit 1); exit 1; }; }
 	pwd)`
 # When building in place, set srcdir=.
@@ -1375,9 +1271,9 @@
 
 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
@@ -1387,25 +1283,25 @@
 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/python]
-  --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/python]
+  --htmldir=DIR          html documentation [DOCDIR]
+  --dvidir=DIR           dvi documentation [DOCDIR]
+  --pdfdir=DIR           pdf documentation [DOCDIR]
+  --psdir=DIR            ps documentation [DOCDIR]
 _ACEOF
 
   cat <<\_ACEOF
@@ -1419,7 +1315,6 @@
   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-universalsdk[=SDKDIR]
@@ -1493,17 +1388,15 @@
 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
+    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|^\.[\\/]||'`
+  ac_dir_suffix=/`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|/||'`
+  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/ ;;
@@ -1539,7 +1432,7 @@
       echo &&
       $SHELL "$ac_srcdir/configure" --help=recursive
     else
-      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
     fi || ac_status=$?
     cd "$ac_pwd" || { ac_status=$?; break; }
   done
@@ -1549,10 +1442,10 @@
 if $ac_init_version; then
   cat <<\_ACEOF
 python configure 2.7
-generated by GNU Autoconf 2.63
+generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+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.
 _ACEOF
@@ -1563,7 +1456,7 @@
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by python $as_me 2.7, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
+generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
 
@@ -1599,7 +1492,7 @@
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  $as_echo "PATH: $as_dir"
+  echo "PATH: $as_dir"
 done
 IFS=$as_save_IFS
 
@@ -1634,7 +1527,7 @@
     | -silent | --silent | --silen | --sile | --sil)
       continue ;;
     *\'*)
-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
     case $ac_pass in
     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
@@ -1686,12 +1579,11 @@
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      *_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) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
       *) $as_unset $ac_var ;;
       esac ;;
     esac
@@ -1721,9 +1613,9 @@
     do
       eval ac_val=\$$ac_var
       case $ac_val in
-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
       esac
-      $as_echo "$ac_var='\''$ac_val'\''"
+      echo "$ac_var='\''$ac_val'\''"
     done | sort
     echo
 
@@ -1738,9 +1630,9 @@
       do
 	eval ac_val=\$$ac_var
 	case $ac_val in
-	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
 	esac
-	$as_echo "$ac_var='\''$ac_val'\''"
+	echo "$ac_var='\''$ac_val'\''"
       done | sort
       echo
     fi
@@ -1756,8 +1648,8 @@
       echo
     fi
     test "$ac_signal" != 0 &&
-      $as_echo "$as_me: caught signal $ac_signal"
-    $as_echo "$as_me: exit $exit_status"
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
   } >&5
   rm -f core *.core core.conftest.* &&
     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
@@ -1799,24 +1691,21 @@
 
 
 # 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
+# Prefer explicitly selected file to automatically selected ones.
 if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$CONFIG_SITE
+  set x "$CONFIG_SITE"
 elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
+  set x "$prefix/share/config.site" "$prefix/etc/config.site"
 else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
+  set x "$ac_default_prefix/share/config.site" \
+	"$ac_default_prefix/etc/config.site"
 fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+shift
+for ac_site_file
 do
-  test "x$ac_site_file" = xNONE && continue
   if test -r "$ac_site_file"; then
-    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
     . "$ac_site_file"
   fi
@@ -1826,16 +1715,16 @@
   # Some versions of bash will fail to source /dev/null (special
   # files actually), so we avoid doing that.
   if test -f "$cache_file"; then
-    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
       [\\/]* | ?:[\\/]* ) . "$cache_file";;
       *)                      . "./$cache_file";;
     esac
   fi
 else
-  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
 
@@ -1849,38 +1738,29 @@
   eval ac_new_val=\$ac_env_${ac_var}_value
   case $ac_old_set,$ac_new_set in
     set,)
-      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      { 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;}
       ac_cache_corrupted=: ;;
     ,set)
-      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      { 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;}
       ac_cache_corrupted=: ;;
     ,);;
     *)
       if test "x$ac_old_val" != "x$ac_new_val"; then
-	# differences in whitespace do not lead to failure.
-	ac_old_val_w=`echo x $ac_old_val`
-	ac_new_val_w=`echo x $ac_new_val`
-	if test "$ac_old_val_w" != "$ac_new_val_w"; then
-	  { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-	  ac_cache_corrupted=:
-	else
-	  { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
-	  eval $ac_var=\$ac_old_val
-	fi
-	{ $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-	{ $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
-$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+	{ 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=:
       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=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
     *) ac_arg=$ac_var=$ac_new_val ;;
     esac
     case " $ac_configure_args " in
@@ -1890,12 +1770,10 @@
   fi
 done
 if $ac_cache_corrupted; then
-  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+  { 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; }; }
 fi
 
@@ -2037,20 +1915,20 @@
 
 
 UNIVERSAL_ARCHS="32-bit"
-{ $as_echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
-$as_echo_n "checking for --with-universal-archs... " >&6; }
+{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
+echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
 
 # Check whether --with-universal-archs was given.
 if test "${with_universal_archs+set}" = set; then
   withval=$with_universal_archs;
-	{ $as_echo "$as_me:$LINENO: result: $withval" >&5
-$as_echo "$withval" >&6; }
+	{ echo "$as_me:$LINENO: result: $withval" >&5
+echo "${ECHO_T}$withval" >&6; }
 	UNIVERSAL_ARCHS="$withval"
 
 else
 
- 	{ $as_echo "$as_me:$LINENO: result: 32-bit" >&5
-$as_echo "32-bit" >&6; }
+ 	{ echo "$as_me:$LINENO: result: 32-bit" >&5
+echo "${ECHO_T}32-bit" >&6; }
 
 fi
 
@@ -2174,8 +2052,8 @@
 ##
 # Set name for machine-dependent library files
 
-{ $as_echo "$as_me:$LINENO: checking MACHDEP" >&5
-$as_echo_n "checking MACHDEP... " >&6; }
+{ echo "$as_me:$LINENO: checking MACHDEP" >&5
+echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
 if test -z "$MACHDEP"
 then
 	ac_sys_system=`uname -s`
@@ -2338,14 +2216,14 @@
         LDFLAGS="$SGI_ABI $LDFLAGS"
         MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
 fi
-{ $as_echo "$as_me:$LINENO: result: $MACHDEP" >&5
-$as_echo "$MACHDEP" >&6; }
+{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
+echo "${ECHO_T}$MACHDEP" >&6; }
 
 # And add extra plat-mac for darwin
 
 
-{ $as_echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
-$as_echo_n "checking EXTRAPLATDIR... " >&6; }
+{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
+echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
 if test -z "$EXTRAPLATDIR"
 then
 	case $MACHDEP in
@@ -2359,8 +2237,8 @@
 		;;
 	esac
 fi
-{ $as_echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
-$as_echo "$EXTRAPLATDIR" >&6; }
+{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
+echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
 
 # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
 # it may influence the way we can build extensions, so distutils
@@ -2370,11 +2248,11 @@
 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
 EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
 
-{ $as_echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
-$as_echo_n "checking machine type as reported by uname -m... " >&6; }
+{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
+echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
 ac_sys_machine=`uname -m`
-{ $as_echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
-$as_echo "$ac_sys_machine" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
+echo "${ECHO_T}$ac_sys_machine" >&6; }
 
 # checks for alternative programs
 
@@ -2386,8 +2264,8 @@
 
 # XXX shouldn't some/most/all of this code be merged with the stuff later
 # on that fiddles with OPT and BASECFLAGS?
-{ $as_echo "$as_me:$LINENO: checking for --without-gcc" >&5
-$as_echo_n "checking for --without-gcc... " >&6; }
+{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
+echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
 
 # Check whether --with-gcc was given.
 if test "${with_gcc+set}" = set; then
@@ -2420,8 +2298,8 @@
 			OPT="$OPT -O"
 			;;
 		*)
-			{ { $as_echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
-$as_echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
+			{ { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
+echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
    { (exit 1); exit 1; }; }
 			;;
 		esac
@@ -2435,15 +2313,15 @@
 	esac
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $without_gcc" >&5
-$as_echo "$without_gcc" >&6; }
+{ echo "$as_me:$LINENO: result: $without_gcc" >&5
+echo "${ECHO_T}$without_gcc" >&6; }
 
 # If the user switches compilers, we can't believe the cache
 if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
 then
-  { { $as_echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
+  { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
 (it is also a good idea to do 'make clean' before compiling)" >&5
-$as_echo "$as_me: error: cached CC is different -- throw away $cache_file
+echo "$as_me: error: cached CC is different -- throw away $cache_file
 (it is also a good idea to do 'make clean' before compiling)" >&2;}
    { (exit 1); exit 1; }; }
 fi
@@ -2456,10 +2334,10 @@
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2472,7 +2350,7 @@
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -2483,11 +2361,11 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
@@ -2496,10 +2374,10 @@
   ac_ct_CC=$CC
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  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.
@@ -2512,7 +2390,7 @@
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -2523,11 +2401,11 @@
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
   if test "x$ac_ct_CC" = x; then
@@ -2535,8 +2413,12 @@
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ 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
@@ -2549,10 +2431,10 @@
           if test -n "$ac_tool_prefix"; then
     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2565,7 +2447,7 @@
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -2576,11 +2458,11 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
@@ -2589,10 +2471,10 @@
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2610,7 +2492,7 @@
        continue
      fi
     ac_cv_prog_CC="cc"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -2633,11 +2515,11 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
@@ -2648,10 +2530,10 @@
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2664,7 +2546,7 @@
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -2675,11 +2557,11 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { $as_echo "$as_me:$LINENO: result: $CC" >&5
-$as_echo "$CC" >&6; }
+  { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
@@ -2692,10 +2574,10 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  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.
@@ -2708,7 +2590,7 @@
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -2719,11 +2601,11 @@
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
+  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
@@ -2735,8 +2617,12 @@
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ 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
@@ -2746,50 +2632,44 @@
 fi
 
 
-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
+echo "$as_me: error: no acceptable C compiler found in \$PATH
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+   { (exit 1); exit 1; }; }
 
 # Provide some information about the compiler.
-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
+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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compiler --version >&5") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
 { (ac_try="$ac_compiler -v >&5"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compiler -v >&5") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
 { (ac_try="$ac_compiler -V >&5"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compiler -V >&5") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
 
 cat >conftest.$ac_ext <<_ACEOF
@@ -2808,22 +2688,27 @@
 }
 _ACEOF
 ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+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.
-{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
+{ 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
 do
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
   esac
 done
@@ -2834,11 +2719,10 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link_default") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  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'
@@ -2849,7 +2733,7 @@
 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_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
 	;;
     [ab].out )
 	# We found the default executable, but exeext='' is most
@@ -2876,27 +2760,25 @@
   ac_file=''
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
 if test -z "$ac_file"; then
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C compiler cannot create executables
+echo "$as_me: error: C compiler cannot create executables
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
 fi
 
 ac_exeext=$ac_cv_exeext
 
 # Check that the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
+{ 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
@@ -2905,53 +2787,49 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
     cross_compiling=no
   else
     if test "$cross_compiling" = maybe; then
 	cross_compiling=yes
     else
-	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
+	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run C compiled programs.
+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; }; }; }
+   { (exit 1); exit 1; }; }
     fi
   fi
 fi
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+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.
-{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
+{ 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; }
 
-{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&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;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  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
@@ -2960,33 +2838,31 @@
 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_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
 	  break;;
     * ) break;;
   esac
 done
 else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+   { (exit 1); exit 1; }; }
 fi
 
 rm -f conftest$ac_cv_exeext
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
+{ 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
-{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3009,43 +2885,40 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   for ac_file in conftest.o conftest.obj conftest.*; do
   test -f "$ac_file" || continue;
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
        break;;
   esac
 done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+   { (exit 1); exit 1; }; }
 fi
 
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6; }
 OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3071,21 +2944,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_compiler_gnu=no
@@ -3095,19 +2967,15 @@
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GCC=yes
-else
-  GCC=
-fi
+{ 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
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
    ac_c_werror_flag=yes
@@ -3134,21 +3002,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	CFLAGS=""
@@ -3173,21 +3040,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_c_werror_flag=$ac_save_c_werror_flag
@@ -3213,21 +3079,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
@@ -3242,8 +3107,8 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    ac_c_werror_flag=$ac_save_c_werror_flag
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
+{ 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
@@ -3259,10 +3124,10 @@
     CFLAGS=
   fi
 fi
-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_cv_prog_cc_c89=no
 ac_save_CC=$CC
@@ -3333,21 +3198,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
@@ -3363,15 +3227,15 @@
 # AC_CACHE_VAL
 case "x$ac_cv_prog_cc_c89" in
   x)
-    { $as_echo "$as_me:$LINENO: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
+    { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
   xno)
-    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
+    { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
   *)
     CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
 esac
 
 
@@ -3384,8 +3248,8 @@
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
-$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
+{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
+echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
 
 # Check whether --with-cxx_main was given.
 if test "${with_cxx_main+set}" = set; then
@@ -3410,8 +3274,8 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $with_cxx_main" >&5
-$as_echo "$with_cxx_main" >&6; }
+{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
+echo "${ECHO_T}$with_cxx_main" >&6; }
 
 preset_cxx="$CXX"
 if test -z "$CXX"
@@ -3419,10 +3283,10 @@
         case "$CC" in
         gcc)    # Extract the first word of "g++", so it can be a program name with args.
 set dummy g++; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_path_CXX+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   case $CXX in
   [\\/]* | ?:[\\/]*)
@@ -3437,7 +3301,7 @@
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -3450,20 +3314,20 @@
 fi
 CXX=$ac_cv_path_CXX
 if test -n "$CXX"; then
-  { $as_echo "$as_me:$LINENO: result: $CXX" >&5
-$as_echo "$CXX" >&6; }
+  { echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
  ;;
         cc)     # Extract the first word of "c++", so it can be a program name with args.
 set dummy c++; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_path_CXX+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   case $CXX in
   [\\/]* | ?:[\\/]*)
@@ -3478,7 +3342,7 @@
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -3491,11 +3355,11 @@
 fi
 CXX=$ac_cv_path_CXX
 if test -n "$CXX"; then
-  { $as_echo "$as_me:$LINENO: result: $CXX" >&5
-$as_echo "$CXX" >&6; }
+  { echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
  ;;
@@ -3511,10 +3375,10 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$CXX"; then
   ac_cv_prog_CXX="$CXX" # Let the user override the test.
@@ -3527,7 +3391,7 @@
   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_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -3538,11 +3402,11 @@
 fi
 CXX=$ac_cv_prog_CXX
 if test -n "$CXX"; then
-  { $as_echo "$as_me:$LINENO: result: $CXX" >&5
-$as_echo "$CXX" >&6; }
+  { echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
@@ -3557,12 +3421,12 @@
 fi
 if test "$preset_cxx" != "$CXX"
 then
-        { $as_echo "$as_me:$LINENO: WARNING:
+        { echo "$as_me:$LINENO: WARNING:
 
   By default, distutils will build C++ extension modules with \"$CXX\".
   If this is not intended, then set CXX on the configure command line.
   " >&5
-$as_echo "$as_me: WARNING:
+echo "$as_me: WARNING:
 
   By default, distutils will build C++ extension modules with \"$CXX\".
   If this is not intended, then set CXX on the configure command line.
@@ -3577,15 +3441,15 @@
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
       # Double quotes because CPP needs to be expanded
     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -3617,21 +3481,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   # Broken: fails on valid input.
@@ -3655,14 +3518,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
@@ -3670,7 +3532,7 @@
   # Broken: success on invalid input.
 continue
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   # Passes both tests.
@@ -3695,8 +3557,8 @@
 else
   ac_cv_prog_CPP=$CPP
 fi
-{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
+{ 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
@@ -3724,21 +3586,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   # Broken: fails on valid input.
@@ -3762,14 +3623,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
@@ -3777,7 +3637,7 @@
   # Broken: success on invalid input.
 continue
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   # Passes both tests.
@@ -3793,13 +3653,11 @@
 if $ac_preproc_ok; then
   :
 else
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+   { (exit 1); exit 1; }; }
 fi
 
 ac_ext=c
@@ -3809,37 +3667,42 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&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
+# 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.
+  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"
+  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"
-    $as_echo 'GREP' >> "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`
@@ -3850,582 +3713,149 @@
     fi
     # 10*(2^10) chars as input seems more than enough
     test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_GREP_found && break 3
-    done
-  done
-done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_prog in egrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_EGREP_found && break 3
-    done
-  done
-done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-else
-  ac_cv_path_EGREP=$EGREP
-fi
-
-   fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_header_stdc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_header_stdc=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-fi
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  eval "$as_ac_Header=yes"
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-  if test "${ac_cv_header_minix_config_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
-$as_echo_n "checking for minix/config.h... " >&6; }
-if test "${ac_cv_header_minix_config_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
-$as_echo "$ac_cv_header_minix_config_h" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5
-$as_echo_n "checking minix/config.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <minix/config.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_header_compiler=no
-fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+    $ac_path_GREP_found && break 3
+  done
+done
+
+done
+IFS=$as_save_IFS
 
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5
-$as_echo_n "checking minix/config.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <minix/config.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
+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
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: minix/config.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: minix/config.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
-    ( cat <<\_ASBOX
-## -------------------------------------- ##
-## Report this to http://bugs.python.org/ ##
-## -------------------------------------- ##
-_ASBOX
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
-$as_echo_n "checking for minix/config.h... " >&6; }
-if test "${ac_cv_header_minix_config_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_minix_config_h=$ac_header_preproc
+  ac_cv_path_GREP=$GREP
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
-$as_echo "$ac_cv_header_minix_config_h" >&6; }
+
 
 fi
-if test "x$ac_cv_header_minix_config_h" = x""yes; then
-  MINIX=yes
+{ 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
-  MINIX=
-fi
+  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
+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
+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
+  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 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
 
 
-  if test "$MINIX" = yes; then
+    $ac_path_EGREP_found && break 3
+  done
+done
 
-cat >>confdefs.h <<\_ACEOF
-#define _POSIX_SOURCE 1
-_ACEOF
+done
+IFS=$as_save_IFS
 
 
-cat >>confdefs.h <<\_ACEOF
-#define _POSIX_1_SOURCE 2
-_ACEOF
+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
 
+else
+  ac_cv_path_EGREP=$EGREP
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define _MINIX 1
-_ACEOF
 
-  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:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
-$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+{ echo "$as_me:$LINENO: checking for AIX" >&5
+echo $ECHO_N "checking for AIX... $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.  */
+#ifdef _AIX
+  yes
+#endif
 
-#	  define __EXTENSIONS__ 1
-	  $ac_includes_default
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_safe_to_define___extensions__=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_safe_to_define___extensions__=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$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 &&
-    cat >>confdefs.h <<\_ACEOF
-#define __EXTENSIONS__ 1
 _ACEOF
-
-  cat >>confdefs.h <<\_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+cat >>confdefs.h <<\_ACEOF
 #define _ALL_SOURCE 1
 _ACEOF
 
-  cat >>confdefs.h <<\_ACEOF
-#define _GNU_SOURCE 1
-_ACEOF
-
-  cat >>confdefs.h <<\_ACEOF
-#define _POSIX_PTHREAD_SEMANTICS 1
-_ACEOF
-
-  cat >>confdefs.h <<\_ACEOF
-#define _TANDEM_SOURCE 1
-_ACEOF
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+rm -f conftest*
 
 
 
@@ -4438,8 +3868,8 @@
 esac
 
 
-{ $as_echo "$as_me:$LINENO: checking for --with-suffix" >&5
-$as_echo_n "checking for --with-suffix... " >&6; }
+{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
+echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
 
 # Check whether --with-suffix was given.
 if test "${with_suffix+set}" = set; then
@@ -4451,26 +3881,26 @@
 	esac
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $EXEEXT" >&5
-$as_echo "$EXEEXT" >&6; }
+{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
+echo "${ECHO_T}$EXEEXT" >&6; }
 
 # Test whether we're running on a non-case-sensitive system, in which
 # case we give a warning if no ext is given
 
-{ $as_echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
-$as_echo_n "checking for case-insensitive build directory... " >&6; }
+{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
+echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
 if test ! -d CaseSensitiveTestDir; then
 mkdir CaseSensitiveTestDir
 fi
 
 if test -d casesensitivetestdir
 then
-    { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
     BUILDEXEEXT=.exe
 else
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 	BUILDEXEEXT=$EXEEXT
 fi
 rmdir CaseSensitiveTestDir
@@ -4503,14 +3933,14 @@
 
 
 
-{ $as_echo "$as_me:$LINENO: checking LIBRARY" >&5
-$as_echo_n "checking LIBRARY... " >&6; }
+{ echo "$as_me:$LINENO: checking LIBRARY" >&5
+echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
 if test -z "$LIBRARY"
 then
 	LIBRARY='libpython$(VERSION).a'
 fi
-{ $as_echo "$as_me:$LINENO: result: $LIBRARY" >&5
-$as_echo "$LIBRARY" >&6; }
+{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
+echo "${ECHO_T}$LIBRARY" >&6; }
 
 # LDLIBRARY is the name of the library to link against (as opposed to the
 # name of the library into which to insert object files). BLDLIBRARY is also
@@ -4545,8 +3975,8 @@
 # This is altered for AIX in order to build the export list before
 # linking.
 
-{ $as_echo "$as_me:$LINENO: checking LINKCC" >&5
-$as_echo_n "checking LINKCC... " >&6; }
+{ echo "$as_me:$LINENO: checking LINKCC" >&5
+echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
 if test -z "$LINKCC"
 then
 	LINKCC='$(PURIFY) $(MAINCC)'
@@ -4566,8 +3996,8 @@
 	   LINKCC=qcc;;
 	esac
 fi
-{ $as_echo "$as_me:$LINENO: result: $LINKCC" >&5
-$as_echo "$LINKCC" >&6; }
+{ echo "$as_me:$LINENO: result: $LINKCC" >&5
+echo "${ECHO_T}$LINKCC" >&6; }
 
 # GNULD is set to "yes" if the GNU linker is used.  If this goes wrong
 # make sure we default having it set to "no": this is used by
@@ -4575,8 +4005,8 @@
 # to linker command lines, and failing to detect GNU ld simply results
 # in the same bahaviour as before.
 
-{ $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
+{ echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
 ac_prog=ld
 if test "$GCC" = yes; then
        ac_prog=`$CC -print-prog-name=ld`
@@ -4587,11 +4017,11 @@
       *)
           GNULD=no;;
 esac
-{ $as_echo "$as_me:$LINENO: result: $GNULD" >&5
-$as_echo "$GNULD" >&6; }
+{ echo "$as_me:$LINENO: result: $GNULD" >&5
+echo "${ECHO_T}$GNULD" >&6; }
 
-{ $as_echo "$as_me:$LINENO: checking for --enable-shared" >&5
-$as_echo_n "checking for --enable-shared... " >&6; }
+{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
+echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
 # Check whether --enable-shared was given.
 if test "${enable_shared+set}" = set; then
   enableval=$enable_shared;
@@ -4607,11 +4037,11 @@
     enable_shared="no";;
   esac
 fi
-{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
-$as_echo "$enable_shared" >&6; }
+{ echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6; }
 
-{ $as_echo "$as_me:$LINENO: checking for --enable-profiling" >&5
-$as_echo_n "checking for --enable-profiling... " >&6; }
+{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
+echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
 # Check whether --enable-profiling was given.
 if test "${enable_profiling+set}" = set; then
   enableval=$enable_profiling; ac_save_cc="$CC"
@@ -4633,32 +4063,29 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_enable_profiling="yes"
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_enable_profiling="no"
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
@@ -4666,8 +4093,8 @@
  CC="$ac_save_cc"
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
-$as_echo "$ac_enable_profiling" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
+echo "${ECHO_T}$ac_enable_profiling" >&6; }
 
 case "$ac_enable_profiling" in
     "yes")
@@ -4676,8 +4103,8 @@
     ;;
 esac
 
-{ $as_echo "$as_me:$LINENO: checking LDLIBRARY" >&5
-$as_echo_n "checking LDLIBRARY... " >&6; }
+{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
+echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
 
 # MacOSX framework builds need more magic. LDLIBRARY is the dynamic
 # library that we build, but we do not want to link against it (we
@@ -4764,16 +4191,16 @@
   esac
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
-$as_echo "$LDLIBRARY" >&6; }
+{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
+echo "${ECHO_T}$LDLIBRARY" >&6; }
 
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -4786,7 +4213,7 @@
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -4797,11 +4224,11 @@
 fi
 RANLIB=$ac_cv_prog_RANLIB
 if test -n "$RANLIB"; then
-  { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
+  { echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
@@ -4810,10 +4237,10 @@
   ac_ct_RANLIB=$RANLIB
   # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  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.
@@ -4826,7 +4253,7 @@
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -4837,11 +4264,11 @@
 fi
 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
 if test -n "$ac_ct_RANLIB"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
+  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
   if test "x$ac_ct_RANLIB" = x; then
@@ -4849,8 +4276,12 @@
   else
     case $cross_compiling:$ac_tool_warned in
 yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+{ 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
     RANLIB=$ac_ct_RANLIB
@@ -4864,10 +4295,10 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$AR"; then
   ac_cv_prog_AR="$AR" # Let the user override the test.
@@ -4880,7 +4311,7 @@
   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_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -4891,11 +4322,11 @@
 fi
 AR=$ac_cv_prog_AR
 if test -n "$AR"; then
-  { $as_echo "$as_me:$LINENO: result: $AR" >&5
-$as_echo "$AR" >&6; }
+  { echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
@@ -4914,10 +4345,10 @@
 
 # Extract the first word of "svnversion", so it can be a program name with args.
 set dummy svnversion; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_prog_SVNVERSION+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$SVNVERSION"; then
   ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
@@ -4930,7 +4361,7 @@
   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_SVNVERSION="found"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -4942,11 +4373,11 @@
 fi
 SVNVERSION=$ac_cv_prog_SVNVERSION
 if test -n "$SVNVERSION"; then
-  { $as_echo "$as_me:$LINENO: result: $SVNVERSION" >&5
-$as_echo "$SVNVERSION" >&6; }
+  { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
+echo "${ECHO_T}$SVNVERSION" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
@@ -4982,8 +4413,8 @@
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+  { { 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; }; }
 fi
 
@@ -5009,12 +4440,11 @@
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # OS/2's system install, which has a completely different semantic
 # ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -5043,29 +4473,17 @@
 	    # 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
+	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	    break 3
 	  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
@@ -5078,8 +4496,8 @@
     INSTALL=$ac_install_sh
   fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
+{ 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.
@@ -5102,8 +4520,8 @@
 fi
 
 # Check for --with-pydebug
-{ $as_echo "$as_me:$LINENO: checking for --with-pydebug" >&5
-$as_echo_n "checking for --with-pydebug... " >&6; }
+{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
+echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
 
 # Check whether --with-pydebug was given.
 if test "${with_pydebug+set}" = set; then
@@ -5115,15 +4533,15 @@
 #define Py_DEBUG 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; };
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; };
   Py_DEBUG='true'
-else { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }; Py_DEBUG='false'
+else { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
 fi
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
@@ -5201,8 +4619,8 @@
     # Python violates C99 rules, by casting between incompatible
     # pointer types. GCC may generate bad code as a result of that,
     # so use -fno-strict-aliasing if supported.
-    { $as_echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
-$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
+    { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
+echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
      ac_save_cc="$CC"
      CC="$CC -fno-strict-aliasing"
      if test "$cross_compiling" = yes; then
@@ -5222,39 +4640,36 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_no_strict_aliasing_ok=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_no_strict_aliasing_ok=no
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
      CC="$ac_save_cc"
-    { $as_echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
-$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
+    { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
+echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
     if test $ac_cv_no_strict_aliasing_ok = yes
     then
       BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
@@ -5293,8 +4708,8 @@
 		   ARCH_RUN_32BIT="arch -i386 -ppc"
 
 		 else
-	           { { $as_echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
-$as_echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
+	           { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
+echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
    { (exit 1); exit 1; }; }
 
 		 fi
@@ -5368,10 +4783,10 @@
   ac_cv_opt_olimit_ok=no
 fi
 
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
-$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
+{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
+echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
 if test "${ac_cv_opt_olimit_ok+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_save_cc="$CC"
 CC="$CC -OPT:Olimit=0"
@@ -5392,32 +4807,29 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_opt_olimit_ok=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_opt_olimit_ok=no
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
@@ -5425,8 +4837,8 @@
 CC="$ac_save_cc"
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
-$as_echo "$ac_cv_opt_olimit_ok" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
+echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
 if test $ac_cv_opt_olimit_ok = yes; then
     case $ac_sys_system in
 	# XXX is this branch needed? On MacOSX 10.2.2 the result of the
@@ -5439,10 +4851,10 @@
 	    ;;
     esac
 else
-  { $as_echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
-$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
+  { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
+echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
   if test "${ac_cv_olimit_ok+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_save_cc="$CC"
   CC="$CC -Olimit 1500"
@@ -5463,32 +4875,29 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_olimit_ok=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_olimit_ok=no
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
@@ -5496,8 +4905,8 @@
   CC="$ac_save_cc"
 fi
 
-  { $as_echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
-$as_echo "$ac_cv_olimit_ok" >&6; }
+  { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
+echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
   if test $ac_cv_olimit_ok = yes; then
     BASECFLAGS="$BASECFLAGS -Olimit 1500"
   fi
@@ -5506,8 +4915,8 @@
 # Check whether GCC supports PyArg_ParseTuple format
 if test "$GCC" = "yes"
 then
-  { $as_echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
-$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
+  { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
+echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
   save_CFLAGS=$CFLAGS
   CFLAGS="$CFLAGS -Werror"
   cat >conftest.$ac_ext <<_ACEOF
@@ -5533,14 +4942,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -5550,14 +4958,14 @@
 #define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
@@ -5570,10 +4978,10 @@
 # complain if unaccepted options are passed (e.g. gcc on Mac OS X).
 # So we have to see first whether pthreads are available without
 # options before we can check whether -Kpthread improves anything.
-{ $as_echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
-$as_echo_n "checking whether pthreads are available without options... " >&6; }
+{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
+echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
 if test "${ac_cv_pthread_is_default+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   ac_cv_pthread_is_default=no
@@ -5604,21 +5012,19 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
   ac_cv_pthread_is_default=yes
@@ -5626,14 +5032,13 @@
   ac_cv_pthread=no
 
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_pthread_is_default=no
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
@@ -5641,8 +5046,8 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
-$as_echo "$ac_cv_pthread_is_default" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
+echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
 
 
 if test $ac_cv_pthread_is_default = yes
@@ -5654,10 +5059,10 @@
 # Some compilers won't report that they do not support -Kpthread,
 # so we need to run a program to see whether it really made the
 # function available.
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
-$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
+{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
+echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
 if test "${ac_cv_kpthread+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_save_cc="$CC"
 CC="$CC -Kpthread"
@@ -5690,32 +5095,29 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_kpthread=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_kpthread=no
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
@@ -5723,8 +5125,8 @@
 CC="$ac_save_cc"
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
-$as_echo "$ac_cv_kpthread" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
+echo "${ECHO_T}$ac_cv_kpthread" >&6; }
 fi
 
 if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
@@ -5734,10 +5136,10 @@
 # Some compilers won't report that they do not support -Kthread,
 # so we need to run a program to see whether it really made the
 # function available.
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
-$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
+{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
+echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
 if test "${ac_cv_kthread+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_save_cc="$CC"
 CC="$CC -Kthread"
@@ -5770,32 +5172,29 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_kthread=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_kthread=no
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
@@ -5803,8 +5202,8 @@
 CC="$ac_save_cc"
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
-$as_echo "$ac_cv_kthread" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
+echo "${ECHO_T}$ac_cv_kthread" >&6; }
 fi
 
 if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
@@ -5814,10 +5213,10 @@
 # Some compilers won't report that they do not support -pthread,
 # so we need to run a program to see whether it really made the
 # function available.
-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
-$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
+{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
+echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
 if test "${ac_cv_thread+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_save_cc="$CC"
 CC="$CC -pthread"
@@ -5850,32 +5249,29 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_pthread=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_pthread=no
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
@@ -5883,8 +5279,8 @@
 CC="$ac_save_cc"
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
-$as_echo "$ac_cv_pthread" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
+echo "${ECHO_T}$ac_cv_pthread" >&6; }
 fi
 
 # If we have set a CC compiler flag for thread support then
@@ -5892,8 +5288,8 @@
 ac_cv_cxx_thread=no
 if test ! -z "$CXX"
 then
-{ $as_echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
-$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
+{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
+echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
 ac_save_cxx="$CXX"
 
 if test "$ac_cv_kpthread" = "yes"
@@ -5923,17 +5319,17 @@
   fi
   rm -fr conftest*
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
-$as_echo "$ac_cv_cxx_thread" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
+echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
 fi
 CXX="$ac_save_cxx"
 
 
 # checks for header files
-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -5960,21 +5356,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_header_stdc=no
@@ -6048,66 +5443,132 @@
 # 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;
-}
+#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.
+
+
+
+
+
+
+
+
+
+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
+
+#include <$ac_header>
 _ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
+  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
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+	eval "$as_ac_Header=no"
 fi
 
-
-fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
+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
 
 fi
 
+done
+
+
 
 
 
@@ -6175,21 +5636,20 @@
 sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
 bluetooth/bluetooth.h linux/tipc.h
 do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+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
-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
+  { 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+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?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&6; }
+{ 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
@@ -6205,33 +5665,32 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_header_compiler=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&6; }
+{ 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
@@ -6245,52 +5704,51 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   ac_header_preproc=no
 fi
 
 rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    { 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:* )
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+    { 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;}
     ( cat <<\_ASBOX
 ## -------------------------------------- ##
 ## Report this to http://bugs.python.org/ ##
@@ -6299,24 +5757,21 @@
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   eval "$as_ac_Header=\$ac_header_preproc"
 fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
 
 fi
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -6330,11 +5785,11 @@
 
 ac_header_dirent=no
 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -6360,21 +5815,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	eval "$as_ac_Header=no"
@@ -6382,15 +5836,12 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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 `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
 _ACEOF
 
 ac_header_dirent=$ac_hdr; break
@@ -6399,10 +5850,10 @@
 done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
-  { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
+  { echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
 if test "${ac_cv_search_opendir+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_func_search_save_LIBS=$LIBS
 cat >conftest.$ac_ext <<_ACEOF
@@ -6440,30 +5891,26 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_search_opendir=$ac_res
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext
   if test "${ac_cv_search_opendir+set}" = set; then
@@ -6478,8 +5925,8 @@
 rm conftest.$ac_ext
 LIBS=$ac_func_search_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
 ac_res=$ac_cv_search_opendir
 if test "$ac_res" != no; then
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -6487,10 +5934,10 @@
 fi
 
 else
-  { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
+  { echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
 if test "${ac_cv_search_opendir+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_func_search_save_LIBS=$LIBS
 cat >conftest.$ac_ext <<_ACEOF
@@ -6528,30 +5975,26 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_search_opendir=$ac_res
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext
   if test "${ac_cv_search_opendir+set}" = set; then
@@ -6566,8 +6009,8 @@
 rm conftest.$ac_ext
 LIBS=$ac_func_search_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
 ac_res=$ac_cv_search_opendir
 if test "$ac_res" != no; then
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -6576,10 +6019,10 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
-$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
+{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
+echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
 if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -6602,50 +6045,46 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_header_sys_types_h_makedev=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_header_sys_types_h_makedev=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
-$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
+echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
 
 if test $ac_cv_header_sys_types_h_makedev = no; then
 if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
-$as_echo_n "checking for sys/mkdev.h... " >&6; }
+  { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
+echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
-$as_echo "$ac_cv_header_sys_mkdev_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
 else
   # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
-$as_echo_n "checking sys/mkdev.h usability... " >&6; }
+{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
+echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -6661,33 +6100,32 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_header_compiler=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
-$as_echo_n "checking sys/mkdev.h presence... " >&6; }
+{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
+echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -6701,52 +6139,51 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   ac_header_preproc=no
 fi
 
 rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: sys/mkdev.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: sys/mkdev.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/mkdev.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/mkdev.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/mkdev.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/mkdev.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 ## -------------------------------------- ##
 ## Report this to http://bugs.python.org/ ##
@@ -6755,18 +6192,18 @@
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
-$as_echo_n "checking for sys/mkdev.h... " >&6; }
+{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
+echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_cv_header_sys_mkdev_h=$ac_header_preproc
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
-$as_echo "$ac_cv_header_sys_mkdev_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
 
 fi
-if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then
+if test $ac_cv_header_sys_mkdev_h = yes; then
 
 cat >>confdefs.h <<\_ACEOF
 #define MAJOR_IN_MKDEV 1
@@ -6778,17 +6215,17 @@
 
   if test $ac_cv_header_sys_mkdev_h = no; then
     if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
-$as_echo_n "checking for sys/sysmacros.h... " >&6; }
+  { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
+echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
-$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
 else
   # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
-$as_echo_n "checking sys/sysmacros.h usability... " >&6; }
+{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
+echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -6804,33 +6241,32 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_header_compiler=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
-$as_echo_n "checking sys/sysmacros.h presence... " >&6; }
+{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
+echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -6844,52 +6280,51 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   ac_header_preproc=no
 fi
 
 rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: sys/sysmacros.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: sys/sysmacros.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/sysmacros.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/sysmacros.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 ## -------------------------------------- ##
 ## Report this to http://bugs.python.org/ ##
@@ -6898,18 +6333,18 @@
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
-$as_echo_n "checking for sys/sysmacros.h... " >&6; }
+{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
+echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_cv_header_sys_sysmacros_h=$ac_header_preproc
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
-$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
 
 fi
-if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then
+if test $ac_cv_header_sys_sysmacros_h = yes; then
 
 cat >>confdefs.h <<\_ACEOF
 #define MAJOR_IN_SYSMACROS 1
@@ -6926,11 +6361,11 @@
 
 for ac_header in term.h
 do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
+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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -6952,21 +6387,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	eval "$as_ac_Header=no"
@@ -6974,15 +6408,12 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -6994,11 +6425,11 @@
 
 for ac_header in linux/netlink.h
 do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
+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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -7023,21 +6454,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	eval "$as_ac_Header=no"
@@ -7045,15 +6475,12 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_Header'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -7063,8 +6490,8 @@
 
 # checks for typedefs
 was_it_defined=no
-{ $as_echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
-$as_echo_n "checking for clock_t in time.h... " >&6; }
+{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
+echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7088,12 +6515,12 @@
 fi
 rm -f conftest*
 
-{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5
-$as_echo "$was_it_defined" >&6; }
+{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
+echo "${ECHO_T}$was_it_defined" >&6; }
 
 # Check whether using makedev requires defining _OSF_SOURCE
-{ $as_echo "$as_me:$LINENO: checking for makedev" >&5
-$as_echo_n "checking for makedev... " >&6; }
+{ echo "$as_me:$LINENO: checking for makedev" >&5
+echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7115,30 +6542,26 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_has_makedev=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_has_makedev=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 if test "$ac_cv_has_makedev" = "no"; then
@@ -7167,30 +6590,26 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_has_makedev=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_has_makedev=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
     if test "$ac_cv_has_makedev" = "yes"; then
@@ -7201,8 +6620,8 @@
 
     fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
-$as_echo "$ac_cv_has_makedev" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
+echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
 if test "$ac_cv_has_makedev" = "yes"; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -7219,8 +6638,8 @@
 # work-around, disable LFS on such configurations
 
 use_lfs=yes
-{ $as_echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
-$as_echo_n "checking Solaris LFS bug... " >&6; }
+{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
+echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7246,29 +6665,28 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
   sol_lfs_bug=no
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	sol_lfs_bug=yes
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
-$as_echo "$sol_lfs_bug" >&6; }
+{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
+echo "${ECHO_T}$sol_lfs_bug" >&6; }
 if test "$sol_lfs_bug" = "yes"; then
   use_lfs=no
 fi
@@ -7296,46 +6714,11 @@
 EOF
 
 # Type availability checks
-{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5
-$as_echo_n "checking for mode_t... " >&6; }
+{ echo "$as_me:$LINENO: checking for mode_t" >&5
+echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_mode_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_type_mode_t=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof (mode_t))
-       return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7343,11 +6726,14 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+typedef mode_t ac__type_new_;
 int
 main ()
 {
-if (sizeof ((mode_t)))
-	  return 0;
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
   ;
   return 0;
 }
@@ -7358,39 +6744,30 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_mode_t=yes
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_cv_type_mode_t=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
+	ac_cv_type_mode_t=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
-$as_echo "$ac_cv_type_mode_t" >&6; }
-if test "x$ac_cv_type_mode_t" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
+echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
+if test $ac_cv_type_mode_t = yes; then
   :
 else
 
@@ -7400,46 +6777,11 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for off_t" >&5
-$as_echo_n "checking for off_t... " >&6; }
+{ echo "$as_me:$LINENO: checking for off_t" >&5
+echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_off_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_type_off_t=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof (off_t))
-       return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7447,11 +6789,14 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+typedef off_t ac__type_new_;
 int
 main ()
 {
-if (sizeof ((off_t)))
-	  return 0;
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
   ;
   return 0;
 }
@@ -7462,39 +6807,30 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_type_off_t=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	ac_cv_type_off_t=yes
+	ac_cv_type_off_t=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
-$as_echo "$ac_cv_type_off_t" >&6; }
-if test "x$ac_cv_type_off_t" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
+echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
+if test $ac_cv_type_off_t = yes; then
   :
 else
 
@@ -7504,46 +6840,11 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
-$as_echo_n "checking for pid_t... " >&6; }
+{ echo "$as_me:$LINENO: checking for pid_t" >&5
+echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_pid_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_type_pid_t=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof (pid_t))
-       return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7551,11 +6852,14 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+typedef pid_t ac__type_new_;
 int
 main ()
 {
-if (sizeof ((pid_t)))
-	  return 0;
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
   ;
   return 0;
 }
@@ -7566,39 +6870,30 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_pid_t=yes
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_cv_type_pid_t=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
+	ac_cv_type_pid_t=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
-$as_echo "$ac_cv_type_pid_t" >&6; }
-if test "x$ac_cv_type_pid_t" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
+echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
+if test $ac_cv_type_pid_t = yes; then
   :
 else
 
@@ -7608,10 +6903,10 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
-$as_echo_n "checking return type of signal handlers... " >&6; }
+{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
+echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
 if test "${ac_cv_type_signal+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -7636,21 +6931,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_type_signal=int
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_type_signal=void
@@ -7658,54 +6952,19 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
-$as_echo "$ac_cv_type_signal" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
+echo "${ECHO_T}$ac_cv_type_signal" >&6; }
 
 cat >>confdefs.h <<_ACEOF
 #define RETSIGTYPE $ac_cv_type_signal
 _ACEOF
 
 
-{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
-$as_echo_n "checking for size_t... " >&6; }
+{ echo "$as_me:$LINENO: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_size_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_type_size_t=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if (sizeof (size_t))
-       return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -7713,11 +6972,14 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+typedef size_t ac__type_new_;
 int
 main ()
 {
-if (sizeof ((size_t)))
-	  return 0;
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
   ;
   return 0;
 }
@@ -7728,39 +6990,30 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_size_t=yes
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_cv_type_size_t=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
+	ac_cv_type_size_t=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-$as_echo "$ac_cv_type_size_t" >&6; }
-if test "x$ac_cv_type_size_t" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
+if test $ac_cv_type_size_t = yes; then
   :
 else
 
@@ -7770,10 +7023,10 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
-$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
+echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
 if test "${ac_cv_type_uid_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -7793,8 +7046,8 @@
 rm -f conftest*
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
-$as_echo "$ac_cv_type_uid_t" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
+echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
 if test $ac_cv_type_uid_t = no; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -7809,10 +7062,10 @@
 fi
 
 
-  { $as_echo "$as_me:$LINENO: checking for uint32_t" >&5
-$as_echo_n "checking for uint32_t... " >&6; }
+  { echo "$as_me:$LINENO: checking for uint32_t" >&5
+echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
 if test "${ac_cv_c_uint32_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_cv_c_uint32_t=no
      for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
@@ -7840,14 +7093,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -7858,7 +7110,7 @@
 esac
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
@@ -7868,8 +7120,8 @@
        test "$ac_cv_c_uint32_t" != no && break
      done
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
-$as_echo "$ac_cv_c_uint32_t" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
+echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
   case $ac_cv_c_uint32_t in #(
   no|yes) ;; #(
   *)
@@ -7886,10 +7138,10 @@
   esac
 
 
-  { $as_echo "$as_me:$LINENO: checking for uint64_t" >&5
-$as_echo_n "checking for uint64_t... " >&6; }
+  { echo "$as_me:$LINENO: checking for uint64_t" >&5
+echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
 if test "${ac_cv_c_uint64_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_cv_c_uint64_t=no
      for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
@@ -7917,14 +7169,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -7935,7 +7186,7 @@
 esac
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
@@ -7945,8 +7196,8 @@
        test "$ac_cv_c_uint64_t" != no && break
      done
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
-$as_echo "$ac_cv_c_uint64_t" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
+echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
   case $ac_cv_c_uint64_t in #(
   no|yes) ;; #(
   *)
@@ -7963,10 +7214,10 @@
   esac
 
 
-  { $as_echo "$as_me:$LINENO: checking for int32_t" >&5
-$as_echo_n "checking for int32_t... " >&6; }
+  { echo "$as_me:$LINENO: checking for int32_t" >&5
+echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
 if test "${ac_cv_c_int32_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_cv_c_int32_t=no
      for ac_type in 'int32_t' 'int' 'long int' \
@@ -7994,14 +7245,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -8017,7 +7267,7 @@
 main ()
 {
 static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
-		 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
+	         < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
 test_array [0] = 0
 
   ;
@@ -8030,21 +7280,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	case $ac_type in
@@ -8056,7 +7305,7 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
@@ -8066,8 +7315,8 @@
        test "$ac_cv_c_int32_t" != no && break
      done
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
-$as_echo "$ac_cv_c_int32_t" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
+echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
   case $ac_cv_c_int32_t in #(
   no|yes) ;; #(
   *)
@@ -8079,10 +7328,10 @@
   esac
 
 
-  { $as_echo "$as_me:$LINENO: checking for int64_t" >&5
-$as_echo_n "checking for int64_t... " >&6; }
+  { echo "$as_me:$LINENO: checking for int64_t" >&5
+echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
 if test "${ac_cv_c_int64_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_cv_c_int64_t=no
      for ac_type in 'int64_t' 'int' 'long int' \
@@ -8110,14 +7359,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -8133,7 +7381,7 @@
 main ()
 {
 static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
-		 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
+	         < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
 test_array [0] = 0
 
   ;
@@ -8146,21 +7394,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	case $ac_type in
@@ -8172,7 +7419,7 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
@@ -8182,8 +7429,8 @@
        test "$ac_cv_c_int64_t" != no && break
      done
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
-$as_echo "$ac_cv_c_int64_t" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
+echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
   case $ac_cv_c_int64_t in #(
   no|yes) ;; #(
   *)
@@ -8194,24 +7441,26 @@
 ;;
   esac
 
-{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5
-$as_echo_n "checking for ssize_t... " >&6; }
+{ echo "$as_me:$LINENO: checking for ssize_t" >&5
+echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_ssize_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_type_ssize_t=no
-cat >conftest.$ac_ext <<_ACEOF
+  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
+typedef ssize_t ac__type_new_;
 int
 main ()
 {
-if (sizeof (ssize_t))
-       return 0;
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
   ;
   return 0;
 }
@@ -8222,18 +7471,45 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_type_ssize_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_ssize_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
+echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
+if test $ac_cv_type_ssize_t = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SSIZE_T 1
+_ACEOF
+
+fi
+
+
+# Sizes of various common basic types
+# ANSI C requires sizeof(char) == 1, so no need to check it
+{ echo "$as_me:$LINENO: checking for int" >&5
+echo $ECHO_N "checking for int... $ECHO_C" >&6; }
+if test "${ac_cv_type_int+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -8241,11 +7517,14 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+typedef int ac__type_new_;
 int
 main ()
 {
-if (sizeof ((ssize_t)))
-	  return 0;
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
   ;
   return 0;
 }
@@ -8256,57 +7535,38 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_ssize_t=yes
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
-$as_echo "$ac_cv_type_ssize_t" >&6; }
-if test "x$ac_cv_type_ssize_t" = x""yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SSIZE_T 1
-_ACEOF
+  ac_cv_type_int=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_cv_type_int=no
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
+echo "${ECHO_T}$ac_cv_type_int" >&6; }
 
-# Sizes of various common basic types
-# ANSI C requires sizeof(char) == 1, so no need to check it
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of int" >&5
-$as_echo_n "checking size of int... " >&6; }
+{ echo "$as_me:$LINENO: checking size of int" >&5
+echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
 if test "${ac_cv_sizeof_int+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
@@ -8317,10 +7577,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef int ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
 test_array [0] = 0
 
   ;
@@ -8333,14 +7594,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -8354,10 +7614,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef int ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -8370,21 +7631,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr $ac_mid + 1`
@@ -8398,7 +7658,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -8408,10 +7668,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef int ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
 test_array [0] = 0
 
   ;
@@ -8424,14 +7685,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -8445,10 +7705,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef int ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -8461,21 +7722,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -8489,7 +7749,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo= ac_hi=
@@ -8509,10 +7769,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef int ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -8525,21 +7786,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -8550,13 +7810,11 @@
 case $ac_lo in
 ?*) ac_cv_sizeof_int=$ac_lo;;
 '') if test "$ac_cv_type_int" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (int)
+echo "$as_me: error: cannot compute sizeof (int)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_int=0
    fi ;;
@@ -8569,8 +7827,9 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-static long int longval () { return (long int) (sizeof (int)); }
-static unsigned long int ulongval () { return (long int) (sizeof (int)); }
+   typedef int ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
 #include <stdio.h>
 #include <stdlib.h>
 int
@@ -8580,22 +7839,20 @@
   FILE *f = fopen ("conftest.val", "w");
   if (! f)
     return 1;
-  if (((long int) (sizeof (int))) < 0)
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
     {
       long int i = longval ();
-      if (i != ((long int) (sizeof (int))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%ld", i);
+      fprintf (f, "%ld\n", i);
     }
   else
     {
       unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (int))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%lu", i);
+      fprintf (f, "%lu\n", i);
     }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
   return ferror (f) || fclose (f) != 0;
 
   ;
@@ -8608,48 +7865,43 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_int=`cat conftest.val`
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
 if test "$ac_cv_type_int" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (int)
+echo "$as_me: error: cannot compute sizeof (int)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_int=0
    fi
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.val
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
-$as_echo "$ac_cv_sizeof_int" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
+echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
 
 
 
@@ -8658,14 +7910,68 @@
 _ACEOF
 
 
+{ echo "$as_me:$LINENO: checking for long" >&5
+echo $ECHO_N "checking for long... $ECHO_C" >&6; }
+if test "${ac_cv_type_long+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
+typedef long ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_long=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_long=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
+echo "${ECHO_T}$ac_cv_type_long" >&6; }
+
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
+{ echo "$as_me:$LINENO: checking size of long" >&5
+echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
 if test "${ac_cv_sizeof_long+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
@@ -8676,10 +7982,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef long ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
 test_array [0] = 0
 
   ;
@@ -8692,14 +7999,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -8713,10 +8019,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef long ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -8729,21 +8036,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr $ac_mid + 1`
@@ -8757,7 +8063,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -8767,10 +8073,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef long ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
 test_array [0] = 0
 
   ;
@@ -8783,14 +8090,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -8804,10 +8110,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef long ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -8820,21 +8127,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -8848,7 +8154,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo= ac_hi=
@@ -8868,10 +8174,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef long ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -8884,21 +8191,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -8909,13 +8215,11 @@
 case $ac_lo in
 ?*) ac_cv_sizeof_long=$ac_lo;;
 '') if test "$ac_cv_type_long" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long)
+echo "$as_me: error: cannot compute sizeof (long)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_long=0
    fi ;;
@@ -8928,8 +8232,9 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-static long int longval () { return (long int) (sizeof (long)); }
-static unsigned long int ulongval () { return (long int) (sizeof (long)); }
+   typedef long ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
 #include <stdio.h>
 #include <stdlib.h>
 int
@@ -8939,22 +8244,20 @@
   FILE *f = fopen ("conftest.val", "w");
   if (! f)
     return 1;
-  if (((long int) (sizeof (long))) < 0)
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
     {
       long int i = longval ();
-      if (i != ((long int) (sizeof (long))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%ld", i);
+      fprintf (f, "%ld\n", i);
     }
   else
     {
       unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (long))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%lu", i);
+      fprintf (f, "%lu\n", i);
     }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
   return ferror (f) || fclose (f) != 0;
 
   ;
@@ -8967,48 +8270,43 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_long=`cat conftest.val`
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
 if test "$ac_cv_type_long" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long)
+echo "$as_me: error: cannot compute sizeof (long)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_long=0
    fi
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.val
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
 
 
 
@@ -9017,14 +8315,68 @@
 _ACEOF
 
 
+{ echo "$as_me:$LINENO: checking for void *" >&5
+echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
+if test "${ac_cv_type_void_p+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
+typedef void * ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_void_p=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_void_p=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
+echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
+
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of void *" >&5
-$as_echo_n "checking size of void *... " >&6; }
+{ echo "$as_me:$LINENO: checking size of void *" >&5
+echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
 if test "${ac_cv_sizeof_void_p+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
@@ -9035,10 +8387,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef void * ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
 test_array [0] = 0
 
   ;
@@ -9051,14 +8404,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -9072,10 +8424,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef void * ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -9088,21 +8441,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr $ac_mid + 1`
@@ -9116,7 +8468,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -9126,10 +8478,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef void * ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
 test_array [0] = 0
 
   ;
@@ -9142,14 +8495,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -9163,10 +8515,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef void * ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -9179,21 +8532,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -9207,7 +8559,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo= ac_hi=
@@ -9227,10 +8579,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef void * ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -9243,21 +8596,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -9268,13 +8620,11 @@
 case $ac_lo in
 ?*) ac_cv_sizeof_void_p=$ac_lo;;
 '') if test "$ac_cv_type_void_p" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (void *)
+echo "$as_me: error: cannot compute sizeof (void *)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_void_p=0
    fi ;;
@@ -9287,8 +8637,9 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-static long int longval () { return (long int) (sizeof (void *)); }
-static unsigned long int ulongval () { return (long int) (sizeof (void *)); }
+   typedef void * ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
 #include <stdio.h>
 #include <stdlib.h>
 int
@@ -9298,22 +8649,20 @@
   FILE *f = fopen ("conftest.val", "w");
   if (! f)
     return 1;
-  if (((long int) (sizeof (void *))) < 0)
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
     {
       long int i = longval ();
-      if (i != ((long int) (sizeof (void *))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%ld", i);
+      fprintf (f, "%ld\n", i);
     }
   else
     {
       unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (void *))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%lu", i);
+      fprintf (f, "%lu\n", i);
     }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
   return ferror (f) || fclose (f) != 0;
 
   ;
@@ -9326,48 +8675,43 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_void_p=`cat conftest.val`
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
 if test "$ac_cv_type_void_p" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (void *)
+echo "$as_me: error: cannot compute sizeof (void *)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_void_p=0
    fi
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.val
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
-$as_echo "$ac_cv_sizeof_void_p" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
+echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
 
 
 
@@ -9376,14 +8720,68 @@
 _ACEOF
 
 
+{ echo "$as_me:$LINENO: checking for short" >&5
+echo $ECHO_N "checking for short... $ECHO_C" >&6; }
+if test "${ac_cv_type_short+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
+typedef short ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_short=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_short=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
+echo "${ECHO_T}$ac_cv_type_short" >&6; }
+
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of short" >&5
-$as_echo_n "checking size of short... " >&6; }
+{ echo "$as_me:$LINENO: checking size of short" >&5
+echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
 if test "${ac_cv_sizeof_short+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
@@ -9394,10 +8792,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef short ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
 test_array [0] = 0
 
   ;
@@ -9410,14 +8809,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -9431,10 +8829,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef short ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -9447,21 +8846,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr $ac_mid + 1`
@@ -9475,7 +8873,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -9485,10 +8883,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef short ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
 test_array [0] = 0
 
   ;
@@ -9501,14 +8900,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -9522,10 +8920,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef short ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -9538,21 +8937,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -9566,7 +8964,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo= ac_hi=
@@ -9586,10 +8984,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef short ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -9602,21 +9001,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -9627,13 +9025,11 @@
 case $ac_lo in
 ?*) ac_cv_sizeof_short=$ac_lo;;
 '') if test "$ac_cv_type_short" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (short)
+echo "$as_me: error: cannot compute sizeof (short)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_short=0
    fi ;;
@@ -9646,8 +9042,9 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-static long int longval () { return (long int) (sizeof (short)); }
-static unsigned long int ulongval () { return (long int) (sizeof (short)); }
+   typedef short ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
 #include <stdio.h>
 #include <stdlib.h>
 int
@@ -9657,22 +9054,20 @@
   FILE *f = fopen ("conftest.val", "w");
   if (! f)
     return 1;
-  if (((long int) (sizeof (short))) < 0)
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
     {
       long int i = longval ();
-      if (i != ((long int) (sizeof (short))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%ld", i);
+      fprintf (f, "%ld\n", i);
     }
   else
     {
       unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (short))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%lu", i);
+      fprintf (f, "%lu\n", i);
     }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
   return ferror (f) || fclose (f) != 0;
 
   ;
@@ -9685,48 +9080,43 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_short=`cat conftest.val`
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
 if test "$ac_cv_type_short" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (short)
+echo "$as_me: error: cannot compute sizeof (short)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_short=0
    fi
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.val
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
-$as_echo "$ac_cv_sizeof_short" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
+echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
 
 
 
@@ -9735,14 +9125,68 @@
 _ACEOF
 
 
+{ echo "$as_me:$LINENO: checking for float" >&5
+echo $ECHO_N "checking for float... $ECHO_C" >&6; }
+if test "${ac_cv_type_float+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
+typedef float ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_float=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_float=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
+echo "${ECHO_T}$ac_cv_type_float" >&6; }
+
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of float" >&5
-$as_echo_n "checking size of float... " >&6; }
+{ echo "$as_me:$LINENO: checking size of float" >&5
+echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
 if test "${ac_cv_sizeof_float+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
@@ -9753,10 +9197,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef float ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
 test_array [0] = 0
 
   ;
@@ -9769,14 +9214,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -9790,10 +9234,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef float ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -9806,21 +9251,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr $ac_mid + 1`
@@ -9834,7 +9278,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -9844,10 +9288,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef float ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (float))) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
 test_array [0] = 0
 
   ;
@@ -9860,14 +9305,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -9881,10 +9325,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef float ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -9897,21 +9342,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -9925,7 +9369,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo= ac_hi=
@@ -9945,10 +9389,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef float ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -9961,21 +9406,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -9986,13 +9430,11 @@
 case $ac_lo in
 ?*) ac_cv_sizeof_float=$ac_lo;;
 '') if test "$ac_cv_type_float" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (float)
+echo "$as_me: error: cannot compute sizeof (float)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_float=0
    fi ;;
@@ -10005,8 +9447,9 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-static long int longval () { return (long int) (sizeof (float)); }
-static unsigned long int ulongval () { return (long int) (sizeof (float)); }
+   typedef float ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
 #include <stdio.h>
 #include <stdlib.h>
 int
@@ -10016,22 +9459,20 @@
   FILE *f = fopen ("conftest.val", "w");
   if (! f)
     return 1;
-  if (((long int) (sizeof (float))) < 0)
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
     {
       long int i = longval ();
-      if (i != ((long int) (sizeof (float))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%ld", i);
+      fprintf (f, "%ld\n", i);
     }
   else
     {
       unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (float))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%lu", i);
+      fprintf (f, "%lu\n", i);
     }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
   return ferror (f) || fclose (f) != 0;
 
   ;
@@ -10044,48 +9485,43 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_float=`cat conftest.val`
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
 if test "$ac_cv_type_float" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (float)
+echo "$as_me: error: cannot compute sizeof (float)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_float=0
    fi
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.val
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
-$as_echo "$ac_cv_sizeof_float" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
+echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
 
 
 
@@ -10094,14 +9530,68 @@
 _ACEOF
 
 
+{ echo "$as_me:$LINENO: checking for double" >&5
+echo $ECHO_N "checking for double... $ECHO_C" >&6; }
+if test "${ac_cv_type_double+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
+typedef double ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_double=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_double=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
+echo "${ECHO_T}$ac_cv_type_double" >&6; }
+
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of double" >&5
-$as_echo_n "checking size of double... " >&6; }
+{ echo "$as_me:$LINENO: checking size of double" >&5
+echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
 if test "${ac_cv_sizeof_double+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
@@ -10112,10 +9602,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef double ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
 test_array [0] = 0
 
   ;
@@ -10128,14 +9619,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -10149,10 +9639,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef double ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -10165,21 +9656,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr $ac_mid + 1`
@@ -10193,7 +9683,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -10203,10 +9693,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef double ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (double))) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
 test_array [0] = 0
 
   ;
@@ -10219,14 +9710,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -10240,10 +9730,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef double ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -10256,21 +9747,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -10284,7 +9774,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo= ac_hi=
@@ -10304,10 +9794,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef double ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -10320,21 +9811,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -10345,13 +9835,11 @@
 case $ac_lo in
 ?*) ac_cv_sizeof_double=$ac_lo;;
 '') if test "$ac_cv_type_double" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (double)
+echo "$as_me: error: cannot compute sizeof (double)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_double=0
    fi ;;
@@ -10364,8 +9852,9 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-static long int longval () { return (long int) (sizeof (double)); }
-static unsigned long int ulongval () { return (long int) (sizeof (double)); }
+   typedef double ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
 #include <stdio.h>
 #include <stdlib.h>
 int
@@ -10375,22 +9864,20 @@
   FILE *f = fopen ("conftest.val", "w");
   if (! f)
     return 1;
-  if (((long int) (sizeof (double))) < 0)
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
     {
       long int i = longval ();
-      if (i != ((long int) (sizeof (double))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%ld", i);
+      fprintf (f, "%ld\n", i);
     }
   else
     {
       unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (double))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%lu", i);
+      fprintf (f, "%lu\n", i);
     }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
   return ferror (f) || fclose (f) != 0;
 
   ;
@@ -10403,64 +9890,113 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_try") 2>&5
+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
+  ac_cv_sizeof_double=`cat conftest.val`
+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 )
+if test "$ac_cv_type_double" = yes; then
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (double)
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+   else
+     ac_cv_sizeof_double=0
+   fi
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
+echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_DOUBLE $ac_cv_sizeof_double
+_ACEOF
+
+
+{ echo "$as_me:$LINENO: checking for fpos_t" >&5
+echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_fpos_t+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
+typedef fpos_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_double=`cat conftest.val`
+  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_type_fpos_t=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-if test "$ac_cv_type_double" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (double)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
-   else
-     ac_cv_sizeof_double=0
-   fi
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+	ac_cv_type_fpos_t=no
 fi
-rm -f conftest.val
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
-$as_echo "$ac_cv_sizeof_double" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_DOUBLE $ac_cv_sizeof_double
-_ACEOF
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
+echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
 
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of fpos_t" >&5
-$as_echo_n "checking size of fpos_t... " >&6; }
+{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
+echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
 if test "${ac_cv_sizeof_fpos_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
@@ -10471,10 +10007,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef fpos_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
 test_array [0] = 0
 
   ;
@@ -10487,14 +10024,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -10508,10 +10044,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef fpos_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -10524,21 +10061,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr $ac_mid + 1`
@@ -10552,7 +10088,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -10562,10 +10098,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef fpos_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
 test_array [0] = 0
 
   ;
@@ -10578,14 +10115,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -10599,10 +10135,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef fpos_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -10615,21 +10152,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -10643,7 +10179,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo= ac_hi=
@@ -10663,10 +10199,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef fpos_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -10679,21 +10216,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -10704,13 +10240,11 @@
 case $ac_lo in
 ?*) ac_cv_sizeof_fpos_t=$ac_lo;;
 '') if test "$ac_cv_type_fpos_t" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (fpos_t)
+echo "$as_me: error: cannot compute sizeof (fpos_t)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_fpos_t=0
    fi ;;
@@ -10723,8 +10257,9 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-static long int longval () { return (long int) (sizeof (fpos_t)); }
-static unsigned long int ulongval () { return (long int) (sizeof (fpos_t)); }
+   typedef fpos_t ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
 #include <stdio.h>
 #include <stdlib.h>
 int
@@ -10734,22 +10269,20 @@
   FILE *f = fopen ("conftest.val", "w");
   if (! f)
     return 1;
-  if (((long int) (sizeof (fpos_t))) < 0)
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
     {
       long int i = longval ();
-      if (i != ((long int) (sizeof (fpos_t))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%ld", i);
+      fprintf (f, "%ld\n", i);
     }
   else
     {
       unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (fpos_t))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%lu", i);
+      fprintf (f, "%lu\n", i);
     }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
   return ferror (f) || fclose (f) != 0;
 
   ;
@@ -10762,48 +10295,43 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_fpos_t=`cat conftest.val`
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
 if test "$ac_cv_type_fpos_t" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (fpos_t)
+echo "$as_me: error: cannot compute sizeof (fpos_t)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_fpos_t=0
    fi
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.val
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
-$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
 
 
 
@@ -10812,14 +10340,68 @@
 _ACEOF
 
 
+{ echo "$as_me:$LINENO: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_size_t+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
+typedef size_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_size_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_size_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
+
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of size_t" >&5
-$as_echo_n "checking size of size_t... " >&6; }
+{ echo "$as_me:$LINENO: checking size of size_t" >&5
+echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
 if test "${ac_cv_sizeof_size_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
@@ -10830,10 +10412,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef size_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
 test_array [0] = 0
 
   ;
@@ -10846,14 +10429,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -10867,10 +10449,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef size_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -10883,21 +10466,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr $ac_mid + 1`
@@ -10911,7 +10493,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -10921,10 +10503,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef size_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
 test_array [0] = 0
 
   ;
@@ -10937,14 +10520,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -10958,10 +10540,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef size_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -10974,21 +10557,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -11002,7 +10584,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo= ac_hi=
@@ -11022,10 +10604,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef size_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -11038,21 +10621,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -11063,13 +10645,11 @@
 case $ac_lo in
 ?*) ac_cv_sizeof_size_t=$ac_lo;;
 '') if test "$ac_cv_type_size_t" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (size_t)
+echo "$as_me: error: cannot compute sizeof (size_t)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_size_t=0
    fi ;;
@@ -11082,8 +10662,9 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-static long int longval () { return (long int) (sizeof (size_t)); }
-static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
+   typedef size_t ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
 #include <stdio.h>
 #include <stdlib.h>
 int
@@ -11093,22 +10674,20 @@
   FILE *f = fopen ("conftest.val", "w");
   if (! f)
     return 1;
-  if (((long int) (sizeof (size_t))) < 0)
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
     {
       long int i = longval ();
-      if (i != ((long int) (sizeof (size_t))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%ld", i);
+      fprintf (f, "%ld\n", i);
     }
   else
     {
       unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (size_t))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%lu", i);
+      fprintf (f, "%lu\n", i);
     }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
   return ferror (f) || fclose (f) != 0;
 
   ;
@@ -11121,48 +10700,43 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_size_t=`cat conftest.val`
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
 if test "$ac_cv_type_size_t" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (size_t)
+echo "$as_me: error: cannot compute sizeof (size_t)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_size_t=0
    fi
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.val
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
-$as_echo "$ac_cv_sizeof_size_t" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
 
 
 
@@ -11171,14 +10745,68 @@
 _ACEOF
 
 
+{ echo "$as_me:$LINENO: checking for pid_t" >&5
+echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_pid_t+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
+typedef pid_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_pid_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_pid_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
+echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
+
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of pid_t" >&5
-$as_echo_n "checking size of pid_t... " >&6; }
+{ echo "$as_me:$LINENO: checking size of pid_t" >&5
+echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
 if test "${ac_cv_sizeof_pid_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
@@ -11189,10 +10817,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef pid_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
 test_array [0] = 0
 
   ;
@@ -11205,14 +10834,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -11226,10 +10854,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef pid_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -11242,21 +10871,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr $ac_mid + 1`
@@ -11270,7 +10898,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -11280,10 +10908,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef pid_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
 test_array [0] = 0
 
   ;
@@ -11296,14 +10925,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -11317,10 +10945,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef pid_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -11333,21 +10962,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -11361,7 +10989,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo= ac_hi=
@@ -11381,10 +11009,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef pid_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -11397,21 +11026,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -11422,13 +11050,11 @@
 case $ac_lo in
 ?*) ac_cv_sizeof_pid_t=$ac_lo;;
 '') if test "$ac_cv_type_pid_t" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (pid_t)
+echo "$as_me: error: cannot compute sizeof (pid_t)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_pid_t=0
    fi ;;
@@ -11441,8 +11067,9 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-static long int longval () { return (long int) (sizeof (pid_t)); }
-static unsigned long int ulongval () { return (long int) (sizeof (pid_t)); }
+   typedef pid_t ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
 #include <stdio.h>
 #include <stdlib.h>
 int
@@ -11452,22 +11079,20 @@
   FILE *f = fopen ("conftest.val", "w");
   if (! f)
     return 1;
-  if (((long int) (sizeof (pid_t))) < 0)
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
     {
       long int i = longval ();
-      if (i != ((long int) (sizeof (pid_t))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%ld", i);
+      fprintf (f, "%ld\n", i);
     }
   else
     {
       unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (pid_t))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%lu", i);
+      fprintf (f, "%lu\n", i);
     }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
   return ferror (f) || fclose (f) != 0;
 
   ;
@@ -11480,48 +11105,43 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_pid_t=`cat conftest.val`
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
 if test "$ac_cv_type_pid_t" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (pid_t)
+echo "$as_me: error: cannot compute sizeof (pid_t)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_pid_t=0
    fi
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.val
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
-$as_echo "$ac_cv_sizeof_pid_t" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
 
 
 
@@ -11531,8 +11151,8 @@
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for long long support" >&5
-$as_echo_n "checking for long long support... " >&6; }
+{ echo "$as_me:$LINENO: checking for long long support" >&5
+echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
 have_long_long=no
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -11555,14 +11175,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -11576,24 +11195,78 @@
   have_long_long=yes
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  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
-{ $as_echo "$as_me:$LINENO: result: $have_long_long" >&5
-$as_echo "$have_long_long" >&6; }
+{ echo "$as_me:$LINENO: result: $have_long_long" >&5
+echo "${ECHO_T}$have_long_long" >&6; }
 if test "$have_long_long" = yes ; then
+{ echo "$as_me:$LINENO: checking for long long" >&5
+echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
+if test "${ac_cv_type_long_long+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
+typedef long long ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_long_long=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_long_long=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
+echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
+
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of long long" >&5
-$as_echo_n "checking size of long long... " >&6; }
+{ echo "$as_me:$LINENO: checking size of long long" >&5
+echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
 if test "${ac_cv_sizeof_long_long+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
@@ -11604,10 +11277,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef long long ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
 test_array [0] = 0
 
   ;
@@ -11620,14 +11294,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -11641,10 +11314,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef long long ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -11657,21 +11331,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr $ac_mid + 1`
@@ -11685,7 +11358,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -11695,10 +11368,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef long long ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
 test_array [0] = 0
 
   ;
@@ -11711,14 +11385,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -11732,10 +11405,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef long long ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -11748,21 +11422,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -11776,7 +11449,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo= ac_hi=
@@ -11796,10 +11469,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef long long ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -11812,21 +11486,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -11837,13 +11510,11 @@
 case $ac_lo in
 ?*) ac_cv_sizeof_long_long=$ac_lo;;
 '') if test "$ac_cv_type_long_long" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long long)
+echo "$as_me: error: cannot compute sizeof (long long)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_long_long=0
    fi ;;
@@ -11856,8 +11527,9 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-static long int longval () { return (long int) (sizeof (long long)); }
-static unsigned long int ulongval () { return (long int) (sizeof (long long)); }
+   typedef long long ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
 #include <stdio.h>
 #include <stdlib.h>
 int
@@ -11867,22 +11539,20 @@
   FILE *f = fopen ("conftest.val", "w");
   if (! f)
     return 1;
-  if (((long int) (sizeof (long long))) < 0)
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
     {
       long int i = longval ();
-      if (i != ((long int) (sizeof (long long))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%ld", i);
+      fprintf (f, "%ld\n", i);
     }
   else
     {
       unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (long long))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%lu", i);
+      fprintf (f, "%lu\n", i);
     }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
   return ferror (f) || fclose (f) != 0;
 
   ;
@@ -11895,48 +11565,43 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_long_long=`cat conftest.val`
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
 if test "$ac_cv_type_long_long" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long long)
+echo "$as_me: error: cannot compute sizeof (long long)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_long_long=0
    fi
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.val
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
-$as_echo "$ac_cv_sizeof_long_long" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
 
 
 
@@ -11947,8 +11612,8 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for long double support" >&5
-$as_echo_n "checking for long double support... " >&6; }
+{ echo "$as_me:$LINENO: checking for long double support" >&5
+echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
 have_long_double=no
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -11971,14 +11636,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -11992,24 +11656,78 @@
   have_long_double=yes
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  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
-{ $as_echo "$as_me:$LINENO: result: $have_long_double" >&5
-$as_echo "$have_long_double" >&6; }
+{ echo "$as_me:$LINENO: result: $have_long_double" >&5
+echo "${ECHO_T}$have_long_double" >&6; }
 if test "$have_long_double" = yes ; then
+{ echo "$as_me:$LINENO: checking for long double" >&5
+echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
+if test "${ac_cv_type_long_double+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
+typedef long double ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_long_double=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_long_double=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
+echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
+
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of long double" >&5
-$as_echo_n "checking size of long double... " >&6; }
+{ echo "$as_me:$LINENO: checking size of long double" >&5
+echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
 if test "${ac_cv_sizeof_long_double+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
@@ -12020,10 +11738,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef long double ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
 test_array [0] = 0
 
   ;
@@ -12036,14 +11755,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -12057,10 +11775,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef long double ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -12073,21 +11792,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr $ac_mid + 1`
@@ -12101,7 +11819,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -12111,10 +11829,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef long double ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long double))) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
 test_array [0] = 0
 
   ;
@@ -12127,14 +11846,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -12148,10 +11866,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef long double ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -12164,21 +11883,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -12192,7 +11910,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo= ac_hi=
@@ -12212,10 +11930,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef long double ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -12228,21 +11947,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -12253,13 +11971,11 @@
 case $ac_lo in
 ?*) ac_cv_sizeof_long_double=$ac_lo;;
 '') if test "$ac_cv_type_long_double" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long double)
+echo "$as_me: error: cannot compute sizeof (long double)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_long_double=0
    fi ;;
@@ -12272,8 +11988,9 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-static long int longval () { return (long int) (sizeof (long double)); }
-static unsigned long int ulongval () { return (long int) (sizeof (long double)); }
+   typedef long double ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
 #include <stdio.h>
 #include <stdlib.h>
 int
@@ -12283,22 +12000,20 @@
   FILE *f = fopen ("conftest.val", "w");
   if (! f)
     return 1;
-  if (((long int) (sizeof (long double))) < 0)
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
     {
       long int i = longval ();
-      if (i != ((long int) (sizeof (long double))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%ld", i);
+      fprintf (f, "%ld\n", i);
     }
   else
     {
       unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (long double))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%lu", i);
+      fprintf (f, "%lu\n", i);
     }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
   return ferror (f) || fclose (f) != 0;
 
   ;
@@ -12311,48 +12026,43 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_long_double=`cat conftest.val`
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
 if test "$ac_cv_type_long_double" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long double)
+echo "$as_me: error: cannot compute sizeof (long double)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_long_double=0
    fi
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.val
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
-$as_echo "$ac_cv_sizeof_long_double" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
 
 
 
@@ -12363,8 +12073,8 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for _Bool support" >&5
-$as_echo_n "checking for _Bool support... " >&6; }
+{ echo "$as_me:$LINENO: checking for _Bool support" >&5
+echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
 have_c99_bool=no
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -12387,14 +12097,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -12408,24 +12117,78 @@
   have_c99_bool=yes
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  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
-{ $as_echo "$as_me:$LINENO: result: $have_c99_bool" >&5
-$as_echo "$have_c99_bool" >&6; }
+{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
+echo "${ECHO_T}$have_c99_bool" >&6; }
 if test "$have_c99_bool" = yes ; then
+{ echo "$as_me:$LINENO: checking for _Bool" >&5
+echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
+if test "${ac_cv_type__Bool+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
+typedef _Bool ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type__Bool=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type__Bool=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
+echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
+
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of _Bool" >&5
-$as_echo_n "checking size of _Bool... " >&6; }
+{ echo "$as_me:$LINENO: checking size of _Bool" >&5
+echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
 if test "${ac_cv_sizeof__Bool+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
@@ -12436,10 +12199,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef _Bool ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
 test_array [0] = 0
 
   ;
@@ -12452,14 +12216,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -12473,10 +12236,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef _Bool ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -12489,21 +12253,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr $ac_mid + 1`
@@ -12517,7 +12280,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -12527,10 +12290,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef _Bool ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
 test_array [0] = 0
 
   ;
@@ -12543,14 +12307,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -12564,10 +12327,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef _Bool ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -12580,21 +12344,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -12608,7 +12371,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo= ac_hi=
@@ -12628,10 +12391,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef _Bool ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -12644,21 +12408,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -12669,13 +12432,11 @@
 case $ac_lo in
 ?*) ac_cv_sizeof__Bool=$ac_lo;;
 '') if test "$ac_cv_type__Bool" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (_Bool)
+echo "$as_me: error: cannot compute sizeof (_Bool)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof__Bool=0
    fi ;;
@@ -12688,8 +12449,9 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-static long int longval () { return (long int) (sizeof (_Bool)); }
-static unsigned long int ulongval () { return (long int) (sizeof (_Bool)); }
+   typedef _Bool ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
 #include <stdio.h>
 #include <stdlib.h>
 int
@@ -12699,22 +12461,20 @@
   FILE *f = fopen ("conftest.val", "w");
   if (! f)
     return 1;
-  if (((long int) (sizeof (_Bool))) < 0)
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
     {
       long int i = longval ();
-      if (i != ((long int) (sizeof (_Bool))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%ld", i);
+      fprintf (f, "%ld\n", i);
     }
   else
     {
       unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (_Bool))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%lu", i);
+      fprintf (f, "%lu\n", i);
     }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
   return ferror (f) || fclose (f) != 0;
 
   ;
@@ -12727,48 +12487,43 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof__Bool=`cat conftest.val`
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
 if test "$ac_cv_type__Bool" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (_Bool)
+echo "$as_me: error: cannot compute sizeof (_Bool)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof__Bool=0
    fi
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.val
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
-$as_echo "$ac_cv_sizeof__Bool" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
+echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
 
 
 
@@ -12779,13 +12534,12 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5
-$as_echo_n "checking for uintptr_t... " >&6; }
+{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
+echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_uintptr_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_type_uintptr_t=no
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -12795,11 +12549,14 @@
         #include <stdint.h>
         #endif
 
+typedef uintptr_t ac__type_new_;
 int
 main ()
 {
-if (sizeof (uintptr_t))
-       return 0;
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
   ;
   return 0;
 }
@@ -12810,33 +12567,55 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_type_uintptr_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_uintptr_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
+echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
+if test $ac_cv_type_uintptr_t = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINTPTR_T 1
+_ACEOF
+
+{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
+echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_uintptr_t+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.  */
-#ifdef HAVE_STDINT_H
-        #include <stdint.h>
-        #endif
-
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+typedef uintptr_t ac__type_new_;
 int
 main ()
 {
-if (sizeof ((uintptr_t)))
-	  return 0;
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
   ;
   return 0;
 }
@@ -12847,52 +12626,38 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_uintptr_t=yes
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_cv_type_uintptr_t=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
+	ac_cv_type_uintptr_t=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
-$as_echo "$ac_cv_type_uintptr_t" >&6; }
-if test "x$ac_cv_type_uintptr_t" = x""yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINTPTR_T 1
-_ACEOF
+{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
+echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
 
 # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of uintptr_t" >&5
-$as_echo_n "checking size of uintptr_t... " >&6; }
+{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
+echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
 if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
@@ -12903,10 +12668,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef uintptr_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
 test_array [0] = 0
 
   ;
@@ -12919,14 +12685,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -12940,10 +12705,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef uintptr_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -12956,21 +12722,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr $ac_mid + 1`
@@ -12984,7 +12749,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -12994,10 +12759,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef uintptr_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
 test_array [0] = 0
 
   ;
@@ -13010,14 +12776,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -13031,10 +12796,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef uintptr_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -13047,21 +12813,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -13075,7 +12840,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo= ac_hi=
@@ -13095,10 +12860,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
+   typedef uintptr_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -13111,21 +12877,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -13136,13 +12901,11 @@
 case $ac_lo in
 ?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
 '') if test "$ac_cv_type_uintptr_t" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (uintptr_t)
+echo "$as_me: error: cannot compute sizeof (uintptr_t)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_uintptr_t=0
    fi ;;
@@ -13155,8 +12918,9 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-static long int longval () { return (long int) (sizeof (uintptr_t)); }
-static unsigned long int ulongval () { return (long int) (sizeof (uintptr_t)); }
+   typedef uintptr_t ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
 #include <stdio.h>
 #include <stdlib.h>
 int
@@ -13166,22 +12930,20 @@
   FILE *f = fopen ("conftest.val", "w");
   if (! f)
     return 1;
-  if (((long int) (sizeof (uintptr_t))) < 0)
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
     {
       long int i = longval ();
-      if (i != ((long int) (sizeof (uintptr_t))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%ld", i);
+      fprintf (f, "%ld\n", i);
     }
   else
     {
       unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (uintptr_t))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%lu", i);
+      fprintf (f, "%lu\n", i);
     }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
   return ferror (f) || fclose (f) != 0;
 
   ;
@@ -13194,48 +12956,43 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_uintptr_t=`cat conftest.val`
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
 if test "$ac_cv_type_uintptr_t" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (uintptr_t)
+echo "$as_me: error: cannot compute sizeof (uintptr_t)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_uintptr_t=0
    fi
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.val
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
-$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
 
 
 
@@ -13249,10 +13006,10 @@
 
 
 # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
-{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5
-$as_echo_n "checking size of off_t... " >&6; }
+{ echo "$as_me:$LINENO: checking size of off_t" >&5
+echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
 if test "${ac_cv_sizeof_off_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   ac_cv_sizeof_off_t=4
@@ -13279,32 +13036,29 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_off_t=`cat conftestval`
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_sizeof_off_t=0
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
@@ -13312,16 +13066,16 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
-$as_echo "$ac_cv_sizeof_off_t" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
 
 cat >>confdefs.h <<_ACEOF
 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
 _ACEOF
 
 
-{ $as_echo "$as_me:$LINENO: checking whether to enable large file support" >&5
-$as_echo_n "checking whether to enable large file support... " >&6; }
+{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
+echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
 if test "$have_long_long" = yes -a \
 	"$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
 	"$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
@@ -13330,18 +13084,18 @@
 #define HAVE_LARGEFILE_SUPPORT 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 # AC_CHECK_SIZEOF() doesn't include <time.h>.
-{ $as_echo "$as_me:$LINENO: checking size of time_t" >&5
-$as_echo_n "checking size of time_t... " >&6; }
+{ echo "$as_me:$LINENO: checking size of time_t" >&5
+echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
 if test "${ac_cv_sizeof_time_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   ac_cv_sizeof_time_t=4
@@ -13368,32 +13122,29 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_time_t=`cat conftestval`
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_sizeof_time_t=0
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
@@ -13401,8 +13152,8 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
-$as_echo "$ac_cv_sizeof_time_t" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
 
 cat >>confdefs.h <<_ACEOF
 #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
@@ -13419,8 +13170,8 @@
 elif test "$ac_cv_pthread" = "yes"
 then CC="$CC -pthread"
 fi
-{ $as_echo "$as_me:$LINENO: checking for pthread_t" >&5
-$as_echo_n "checking for pthread_t... " >&6; }
+{ echo "$as_me:$LINENO: checking for pthread_t" >&5
+echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
 have_pthread_t=no
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -13443,35 +13194,34 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
   have_pthread_t=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  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
-{ $as_echo "$as_me:$LINENO: result: $have_pthread_t" >&5
-$as_echo "$have_pthread_t" >&6; }
+{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
+echo "${ECHO_T}$have_pthread_t" >&6; }
 if test "$have_pthread_t" = yes ; then
   # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
-  { $as_echo "$as_me:$LINENO: checking size of pthread_t" >&5
-$as_echo_n "checking size of pthread_t... " >&6; }
+  { echo "$as_me:$LINENO: checking size of pthread_t" >&5
+echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
   if test "${ac_cv_sizeof_pthread_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   ac_cv_sizeof_pthread_t=4
@@ -13498,32 +13248,29 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_pthread_t=`cat conftestval`
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_sizeof_pthread_t=0
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
@@ -13531,8 +13278,8 @@
 
 fi
 
-  { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
-$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
+  { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
 
 cat >>confdefs.h <<_ACEOF
 #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
@@ -13541,8 +13288,8 @@
 fi
 CC="$ac_save_cc"
 
-{ $as_echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
-$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
+{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
+echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
 # Check whether --enable-toolbox-glue was given.
 if test "${enable_toolbox_glue+set}" = set; then
   enableval=$enable_toolbox_glue;
@@ -13573,8 +13320,8 @@
 	extra_undefs=""
 	;;
 esac
-{ $as_echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
-$as_echo "$enable_toolbox_glue" >&6; }
+{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
+echo "${ECHO_T}$enable_toolbox_glue" >&6; }
 
 
 
@@ -13611,8 +13358,8 @@
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
 esac
 
-{ $as_echo "$as_me:$LINENO: checking for --enable-framework" >&5
-$as_echo_n "checking for --enable-framework... " >&6; }
+{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
+echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
 if test "$enable_framework"
 then
 	BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
@@ -13623,15 +13370,21 @@
 #define WITH_NEXT_FRAMEWORK 1
 _ACEOF
 
-	{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+	{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+	if test $enable_shared = "yes"
+	then
+		{ { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
+echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;}
+   { (exit 1); exit 1; }; }
+	fi
 else
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for dyld" >&5
-$as_echo_n "checking for dyld... " >&6; }
+{ echo "$as_me:$LINENO: checking for dyld" >&5
+echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
 case $ac_sys_system/$ac_sys_release in
   Darwin/*)
 
@@ -13639,12 +13392,12 @@
 #define WITH_DYLD 1
 _ACEOF
 
-  	{ $as_echo "$as_me:$LINENO: result: always on for Darwin" >&5
-$as_echo "always on for Darwin" >&6; }
+  	{ echo "$as_me:$LINENO: result: always on for Darwin" >&5
+echo "${ECHO_T}always on for Darwin" >&6; }
   	;;
   *)
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 	;;
 esac
 
@@ -13656,8 +13409,8 @@
 
 # SO is the extension of shared libraries `(including the dot!)
 # -- usually .so, .sl on HP-UX, .dll on Cygwin
-{ $as_echo "$as_me:$LINENO: checking SO" >&5
-$as_echo_n "checking SO... " >&6; }
+{ echo "$as_me:$LINENO: checking SO" >&5
+echo $ECHO_N "checking SO... $ECHO_C" >&6; }
 if test -z "$SO"
 then
 	case $ac_sys_system in
@@ -13682,8 +13435,8 @@
         echo '====================================================================='
 	sleep 10
 fi
-{ $as_echo "$as_me:$LINENO: result: $SO" >&5
-$as_echo "$SO" >&6; }
+{ echo "$as_me:$LINENO: result: $SO" >&5
+echo "${ECHO_T}$SO" >&6; }
 
 
 cat >>confdefs.h <<_ACEOF
@@ -13694,8 +13447,8 @@
 # -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
 # (Shared libraries in this instance are shared modules to be loaded into
 # Python, as opposed to building Python itself as a shared library.)
-{ $as_echo "$as_me:$LINENO: checking LDSHARED" >&5
-$as_echo_n "checking LDSHARED... " >&6; }
+{ echo "$as_me:$LINENO: checking LDSHARED" >&5
+echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
 if test -z "$LDSHARED"
 then
 	case $ac_sys_system/$ac_sys_release in
@@ -13801,13 +13554,13 @@
 	*)	LDSHARED="ld";;
 	esac
 fi
-{ $as_echo "$as_me:$LINENO: result: $LDSHARED" >&5
-$as_echo "$LDSHARED" >&6; }
+{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
+echo "${ECHO_T}$LDSHARED" >&6; }
 BLDSHARED=${BLDSHARED-$LDSHARED}
 # CCSHARED are the C *flags* used to create objects to go into a shared
 # library (module) -- this is only needed for a few systems
-{ $as_echo "$as_me:$LINENO: checking CCSHARED" >&5
-$as_echo_n "checking CCSHARED... " >&6; }
+{ echo "$as_me:$LINENO: checking CCSHARED" >&5
+echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
 if test -z "$CCSHARED"
 then
 	case $ac_sys_system/$ac_sys_release in
@@ -13842,12 +13595,12 @@
 	atheos*) CCSHARED="-fPIC";;
 	esac
 fi
-{ $as_echo "$as_me:$LINENO: result: $CCSHARED" >&5
-$as_echo "$CCSHARED" >&6; }
+{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
+echo "${ECHO_T}$CCSHARED" >&6; }
 # LINKFORSHARED are the flags passed to the $(CC) command that links
 # the python executable -- this is only needed for a few systems
-{ $as_echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
-$as_echo_n "checking LINKFORSHARED... " >&6; }
+{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
+echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
 if test -z "$LINKFORSHARED"
 then
 	case $ac_sys_system/$ac_sys_release in
@@ -13902,13 +13655,13 @@
 		LINKFORSHARED='-Wl,-E -N 2048K';;
 	esac
 fi
-{ $as_echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
-$as_echo "$LINKFORSHARED" >&6; }
+{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
+echo "${ECHO_T}$LINKFORSHARED" >&6; }
 
 
 
-{ $as_echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
-$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
+{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
+echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
 if test ! "$LIBRARY" = "$LDLIBRARY"
 then
 	case $ac_sys_system in
@@ -13920,8 +13673,8 @@
 		CFLAGSFORSHARED='$(CCSHARED)'
 	esac
 fi
-{ $as_echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
-$as_echo "$CFLAGSFORSHARED" >&6; }
+{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
+echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
 
 # SHLIBS are libraries (except -lc and -lm) to link to the python shared
 # library (with --enable-shared).
@@ -13932,22 +13685,22 @@
 # don't need to link LIBS explicitly. The default should be only changed
 # on systems where this approach causes problems.
 
-{ $as_echo "$as_me:$LINENO: checking SHLIBS" >&5
-$as_echo_n "checking SHLIBS... " >&6; }
+{ echo "$as_me:$LINENO: checking SHLIBS" >&5
+echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
 case "$ac_sys_system" in
 	*)
 		SHLIBS='$(LIBS)';;
 esac
-{ $as_echo "$as_me:$LINENO: result: $SHLIBS" >&5
-$as_echo "$SHLIBS" >&6; }
+{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
+echo "${ECHO_T}$SHLIBS" >&6; }
 
 
 # checks for libraries
 
-{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldl  $LIBS"
@@ -13979,37 +13732,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_dl_dlopen=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_dl_dlopen=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
+{ 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
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBDL 1
 _ACEOF
@@ -14019,10 +13768,10 @@
 fi
 	# Dynamic linking for SunOS/Solaris and SYSV
 
-{ $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
+{ 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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldld  $LIBS"
@@ -14054,37 +13803,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_dld_shl_load=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_dld_shl_load=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
+{ 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
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBDLD 1
 _ACEOF
@@ -14096,10 +13841,10 @@
 
 # only check for sem_init if thread support is requested
 if test "$with_threads" = "yes" -o -z "$with_threads"; then
-    { $as_echo "$as_me:$LINENO: checking for library containing sem_init" >&5
-$as_echo_n "checking for library containing sem_init... " >&6; }
+    { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
+echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
 if test "${ac_cv_search_sem_init+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_func_search_save_LIBS=$LIBS
 cat >conftest.$ac_ext <<_ACEOF
@@ -14137,30 +13882,26 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_search_sem_init=$ac_res
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext
   if test "${ac_cv_search_sem_init+set}" = set; then
@@ -14175,8 +13916,8 @@
 rm conftest.$ac_ext
 LIBS=$ac_func_search_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
-$as_echo "$ac_cv_search_sem_init" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
+echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
 ac_res=$ac_cv_search_sem_init
 if test "$ac_res" != no; then
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
@@ -14188,10 +13929,10 @@
 fi
 
 # check if we need libintl for locale functions
-{ $as_echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
-$as_echo_n "checking for textdomain in -lintl... " >&6; }
+{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
+echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
 if test "${ac_cv_lib_intl_textdomain+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lintl  $LIBS"
@@ -14223,37 +13964,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_intl_textdomain=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_intl_textdomain=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
-$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
-if test "x$ac_cv_lib_intl_textdomain" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
+if test $ac_cv_lib_intl_textdomain = yes; then
 
 cat >>confdefs.h <<\_ACEOF
 #define WITH_LIBINTL 1
@@ -14264,8 +14001,8 @@
 
 # checks for system dependent C++ extensions support
 case "$ac_sys_system" in
-	AIX*)	{ $as_echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
-$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
+	AIX*)	{ echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
+echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
 		cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -14287,37 +14024,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
 
 cat >>confdefs.h <<\_ACEOF
 #define AIX_GENUINE_CPLUSPLUS 1
 _ACEOF
 
-			     { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+			     { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext;;
 	*) ;;
@@ -14325,10 +14058,10 @@
 
 # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
 # BeOS' sockets are stashed in libnet.
-{ $as_echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
-$as_echo_n "checking for t_open in -lnsl... " >&6; }
+{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
+echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
 if test "${ac_cv_lib_nsl_t_open+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lnsl  $LIBS"
@@ -14360,44 +14093,40 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_nsl_t_open=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_nsl_t_open=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
-$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
-if test "x$ac_cv_lib_nsl_t_open" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
+if test $ac_cv_lib_nsl_t_open = yes; then
   LIBS="-lnsl $LIBS"
 fi
  # SVR4
-{ $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
-$as_echo_n "checking for socket in -lsocket... " >&6; }
+{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
+echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
 if test "${ac_cv_lib_socket_socket+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lsocket $LIBS $LIBS"
@@ -14429,47 +14158,43 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_socket_socket=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_socket_socket=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
-$as_echo "$ac_cv_lib_socket_socket" >&6; }
-if test "x$ac_cv_lib_socket_socket" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
+if test $ac_cv_lib_socket_socket = yes; then
   LIBS="-lsocket $LIBS"
 fi
  # SVR4 sockets
 
 case "$ac_sys_system" in
 BeOS*)
-{ $as_echo "$as_me:$LINENO: checking for socket in -lnet" >&5
-$as_echo_n "checking for socket in -lnet... " >&6; }
+{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
+echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
 if test "${ac_cv_lib_net_socket+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lnet $LIBS $LIBS"
@@ -14501,62 +14226,58 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_net_socket=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_net_socket=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
-$as_echo "$ac_cv_lib_net_socket" >&6; }
-if test "x$ac_cv_lib_net_socket" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
+echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
+if test $ac_cv_lib_net_socket = yes; then
   LIBS="-lnet $LIBS"
 fi
  # BeOS
 ;;
 esac
 
-{ $as_echo "$as_me:$LINENO: checking for --with-libs" >&5
-$as_echo_n "checking for --with-libs... " >&6; }
+{ echo "$as_me:$LINENO: checking for --with-libs" >&5
+echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
 
 # Check whether --with-libs was given.
 if test "${with_libs+set}" = set; then
   withval=$with_libs;
-{ $as_echo "$as_me:$LINENO: result: $withval" >&5
-$as_echo "$withval" >&6; }
+{ echo "$as_me:$LINENO: result: $withval" >&5
+echo "${ECHO_T}$withval" >&6; }
 LIBS="$withval $LIBS"
 
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
 # Check for use of the system libffi library
-{ $as_echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
-$as_echo_n "checking for --with-system-ffi... " >&6; }
+{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
+echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
 
 # Check whether --with-system_ffi was given.
 if test "${with_system_ffi+set}" = set; then
@@ -14564,41 +14285,41 @@
 fi
 
 
-{ $as_echo "$as_me:$LINENO: result: $with_system_ffi" >&5
-$as_echo "$with_system_ffi" >&6; }
+{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
+echo "${ECHO_T}$with_system_ffi" >&6; }
 
 # Check for --with-dbmliborder
-{ $as_echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
-$as_echo_n "checking for --with-dbmliborder... " >&6; }
+{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
+echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
 
 # Check whether --with-dbmliborder was given.
 if test "${with_dbmliborder+set}" = set; then
   withval=$with_dbmliborder;
 if test x$with_dbmliborder = xyes
 then
-{ { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
-$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
+{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
+echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
    { (exit 1); exit 1; }; }
 else
   for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
     if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
     then
-      { { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
-$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
+      { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
+echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
    { (exit 1); exit 1; }; }
     fi
   done
 fi
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
-$as_echo "$with_dbmliborder" >&6; }
+{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
+echo "${ECHO_T}$with_dbmliborder" >&6; }
 
 # Determine if signalmodule should be used.
 
 
-{ $as_echo "$as_me:$LINENO: checking for --with-signal-module" >&5
-$as_echo_n "checking for --with-signal-module... " >&6; }
+{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
+echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
 
 # Check whether --with-signal-module was given.
 if test "${with_signal_module+set}" = set; then
@@ -14609,8 +14330,8 @@
 if test -z "$with_signal_module"
 then with_signal_module="yes"
 fi
-{ $as_echo "$as_me:$LINENO: result: $with_signal_module" >&5
-$as_echo "$with_signal_module" >&6; }
+{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
+echo "${ECHO_T}$with_signal_module" >&6; }
 
 if test "${with_signal_module}" = "yes"; then
 	USE_SIGNAL_MODULE=""
@@ -14624,22 +14345,22 @@
 
 USE_THREAD_MODULE=""
 
-{ $as_echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
-$as_echo_n "checking for --with-dec-threads... " >&6; }
+{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
+echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
 
 
 # Check whether --with-dec-threads was given.
 if test "${with_dec_threads+set}" = set; then
   withval=$with_dec_threads;
-{ $as_echo "$as_me:$LINENO: result: $withval" >&5
-$as_echo "$withval" >&6; }
+{ echo "$as_me:$LINENO: result: $withval" >&5
+echo "${ECHO_T}$withval" >&6; }
 LDLAST=-threads
 if test "${with_thread+set}" != set; then
    with_thread="$withval";
 fi
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
@@ -14652,8 +14373,8 @@
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for --with-threads" >&5
-$as_echo_n "checking for --with-threads... " >&6; }
+{ echo "$as_me:$LINENO: checking for --with-threads" >&5
+echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
 
 # Check whether --with-threads was given.
 if test "${with_threads+set}" = set; then
@@ -14672,8 +14393,8 @@
 if test -z "$with_threads"
 then with_threads="yes"
 fi
-{ $as_echo "$as_me:$LINENO: result: $with_threads" >&5
-$as_echo "$with_threads" >&6; }
+{ echo "$as_me:$LINENO: result: $with_threads" >&5
+echo "${ECHO_T}$with_threads" >&6; }
 
 
 if test "$with_threads" = "no"
@@ -14739,8 +14460,8 @@
     # According to the POSIX spec, a pthreads implementation must
     # define _POSIX_THREADS in unistd.h. Some apparently don't
     # (e.g. gnu pth with pthread emulation)
-    { $as_echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
-$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
+    { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
+echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
     cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -14762,25 +14483,25 @@
 fi
 rm -f conftest*
 
-    { $as_echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
-$as_echo "$unistd_defines_pthreads" >&6; }
+    { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
+echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
 
     cat >>confdefs.h <<\_ACEOF
 #define _REENTRANT 1
 _ACEOF
 
     if test "${ac_cv_header_cthreads_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5
-$as_echo_n "checking for cthreads.h... " >&6; }
+  { echo "$as_me:$LINENO: checking for cthreads.h" >&5
+echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_cthreads_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
-$as_echo "$ac_cv_header_cthreads_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
+echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
 else
   # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking cthreads.h usability" >&5
-$as_echo_n "checking cthreads.h usability... " >&6; }
+{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
+echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -14796,33 +14517,32 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_header_compiler=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking cthreads.h presence" >&5
-$as_echo_n "checking cthreads.h presence... " >&6; }
+{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
+echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -14836,52 +14556,51 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   ac_header_preproc=no
 fi
 
 rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cthreads.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: cthreads.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cthreads.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: cthreads.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: cthreads.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: cthreads.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: cthreads.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: cthreads.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 ## -------------------------------------- ##
 ## Report this to http://bugs.python.org/ ##
@@ -14890,18 +14609,18 @@
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5
-$as_echo_n "checking for cthreads.h... " >&6; }
+{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
+echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_cthreads_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_cv_header_cthreads_h=$ac_header_preproc
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
-$as_echo "$ac_cv_header_cthreads_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
+echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
 
 fi
-if test "x$ac_cv_header_cthreads_h" = x""yes; then
+if test $ac_cv_header_cthreads_h = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define WITH_THREAD 1
 _ACEOF
@@ -14920,17 +14639,17 @@
 else
 
     if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
-$as_echo_n "checking for mach/cthreads.h... " >&6; }
+  { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
+echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
-$as_echo "$ac_cv_header_mach_cthreads_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
+echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
 else
   # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
-$as_echo_n "checking mach/cthreads.h usability... " >&6; }
+{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
+echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -14946,33 +14665,32 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_header_compiler=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
-$as_echo_n "checking mach/cthreads.h presence... " >&6; }
+{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
+echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -14986,52 +14704,51 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   ac_header_preproc=no
 fi
 
 rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: mach/cthreads.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: mach/cthreads.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: mach/cthreads.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: mach/cthreads.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: mach/cthreads.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: mach/cthreads.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 ## -------------------------------------- ##
 ## Report this to http://bugs.python.org/ ##
@@ -15040,18 +14757,18 @@
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
-$as_echo_n "checking for mach/cthreads.h... " >&6; }
+{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
+echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_cv_header_mach_cthreads_h=$ac_header_preproc
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
-$as_echo "$ac_cv_header_mach_cthreads_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
+echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
 
 fi
-if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then
+if test $ac_cv_header_mach_cthreads_h = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define WITH_THREAD 1
 _ACEOF
@@ -15068,13 +14785,13 @@
     THREADOBJ="Python/thread.o"
 else
 
-    { $as_echo "$as_me:$LINENO: checking for --with-pth" >&5
-$as_echo_n "checking for --with-pth... " >&6; }
+    { echo "$as_me:$LINENO: checking for --with-pth" >&5
+echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
 
 # Check whether --with-pth was given.
 if test "${with_pth+set}" = set; then
-  withval=$with_pth; { $as_echo "$as_me:$LINENO: result: $withval" >&5
-$as_echo "$withval" >&6; }
+  withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
+echo "${ECHO_T}$withval" >&6; }
                   cat >>confdefs.h <<\_ACEOF
 #define WITH_THREAD 1
 _ACEOF
@@ -15087,16 +14804,16 @@
                   LIBS="-lpth $LIBS"
                   THREADOBJ="Python/thread.o"
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
     # Just looking for pthread_create in libpthread is not enough:
     # on HP/UX, pthread.h renames pthread_create to a different symbol name.
     # So we really have to include pthread.h, and then link.
     _libs=$LIBS
     LIBS="$LIBS -lpthread"
-    { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
-$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
+    { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
+echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
     cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -15121,24 +14838,21 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
 
-    { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
     cat >>confdefs.h <<\_ACEOF
 #define WITH_THREAD 1
 _ACEOF
@@ -15146,15 +14860,15 @@
     posix_threads=yes
     THREADOBJ="Python/thread.o"
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
     LIBS=$_libs
-    { $as_echo "$as_me:$LINENO: checking for pthread_detach" >&5
-$as_echo_n "checking for pthread_detach... " >&6; }
+    { echo "$as_me:$LINENO: checking for pthread_detach" >&5
+echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
 if test "${ac_cv_func_pthread_detach+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -15207,36 +14921,32 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_func_pthread_detach=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_func_pthread_detach=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
-$as_echo "$ac_cv_func_pthread_detach" >&6; }
-if test "x$ac_cv_func_pthread_detach" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
+echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
+if test $ac_cv_func_pthread_detach = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define WITH_THREAD 1
 _ACEOF
@@ -15246,17 +14956,17 @@
 else
 
     if test "${ac_cv_header_atheos_threads_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
-$as_echo_n "checking for atheos/threads.h... " >&6; }
+  { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
+echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
-$as_echo "$ac_cv_header_atheos_threads_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
+echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
 else
   # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
-$as_echo_n "checking atheos/threads.h usability... " >&6; }
+{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
+echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -15272,33 +14982,32 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_header_compiler=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
-$as_echo_n "checking atheos/threads.h presence... " >&6; }
+{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
+echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -15312,52 +15021,51 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   ac_header_preproc=no
 fi
 
 rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: atheos/threads.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: atheos/threads.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: atheos/threads.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: atheos/threads.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: atheos/threads.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: atheos/threads.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 ## -------------------------------------- ##
 ## Report this to http://bugs.python.org/ ##
@@ -15366,18 +15074,18 @@
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
-$as_echo_n "checking for atheos/threads.h... " >&6; }
+{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
+echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_cv_header_atheos_threads_h=$ac_header_preproc
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
-$as_echo "$ac_cv_header_atheos_threads_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
+echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
 
 fi
-if test "x$ac_cv_header_atheos_threads_h" = x""yes; then
+if test $ac_cv_header_atheos_threads_h = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define WITH_THREAD 1
 _ACEOF
@@ -15391,17 +15099,17 @@
 else
 
     if test "${ac_cv_header_kernel_OS_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
-$as_echo_n "checking for kernel/OS.h... " >&6; }
+  { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
+echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
-$as_echo "$ac_cv_header_kernel_OS_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
+echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
 else
   # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
-$as_echo_n "checking kernel/OS.h usability... " >&6; }
+{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
+echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -15417,33 +15125,32 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_header_compiler=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
-$as_echo_n "checking kernel/OS.h presence... " >&6; }
+{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
+echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -15457,52 +15164,51 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   ac_header_preproc=no
 fi
 
 rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: kernel/OS.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: kernel/OS.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: kernel/OS.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: kernel/OS.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: kernel/OS.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: kernel/OS.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 ## -------------------------------------- ##
 ## Report this to http://bugs.python.org/ ##
@@ -15511,18 +15217,18 @@
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
-$as_echo_n "checking for kernel/OS.h... " >&6; }
+{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
+echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_cv_header_kernel_OS_h=$ac_header_preproc
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
-$as_echo "$ac_cv_header_kernel_OS_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
+echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
 
 fi
-if test "x$ac_cv_header_kernel_OS_h" = x""yes; then
+if test $ac_cv_header_kernel_OS_h = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define WITH_THREAD 1
 _ACEOF
@@ -15535,10 +15241,10 @@
     THREADOBJ="Python/thread.o"
 else
 
-    { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
-$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
+    { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
+echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
 if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lpthreads  $LIBS"
@@ -15570,37 +15276,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_pthreads_pthread_create=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_pthreads_pthread_create=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
-$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
-if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
+if test $ac_cv_lib_pthreads_pthread_create = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define WITH_THREAD 1
 _ACEOF
@@ -15610,10 +15312,10 @@
     THREADOBJ="Python/thread.o"
 else
 
-    { $as_echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
-$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
+    { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
+echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
 if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lc_r  $LIBS"
@@ -15645,37 +15347,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_c_r_pthread_create=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_c_r_pthread_create=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
-$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
-if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
+if test $ac_cv_lib_c_r_pthread_create = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define WITH_THREAD 1
 _ACEOF
@@ -15685,10 +15383,10 @@
     THREADOBJ="Python/thread.o"
 else
 
-    { $as_echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
-$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
+    { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
+echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
 if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lpthread  $LIBS"
@@ -15720,37 +15418,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_pthread___pthread_create_system=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_pthread___pthread_create_system=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
-$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
-if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
+if test $ac_cv_lib_pthread___pthread_create_system = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define WITH_THREAD 1
 _ACEOF
@@ -15760,10 +15454,10 @@
     THREADOBJ="Python/thread.o"
 else
 
-    { $as_echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
-$as_echo_n "checking for pthread_create in -lcma... " >&6; }
+    { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
+echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
 if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lcma  $LIBS"
@@ -15795,37 +15489,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_cma_pthread_create=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_cma_pthread_create=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
-$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
-if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
+if test $ac_cv_lib_cma_pthread_create = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define WITH_THREAD 1
 _ACEOF
@@ -15855,7 +15545,6 @@
 
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
@@ -15867,10 +15556,10 @@
 
 
 
-    { $as_echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
-$as_echo_n "checking for usconfig in -lmpc... " >&6; }
+    { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
+echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
 if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lmpc  $LIBS"
@@ -15902,37 +15591,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_mpc_usconfig=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_mpc_usconfig=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
-$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
-if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
+echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
+if test $ac_cv_lib_mpc_usconfig = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define WITH_THREAD 1
 _ACEOF
@@ -15944,10 +15629,10 @@
 
 
     if test "$posix_threads" != "yes"; then
-      { $as_echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
-$as_echo_n "checking for thr_create in -lthread... " >&6; }
+      { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
+echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
 if test "${ac_cv_lib_thread_thr_create+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lthread  $LIBS"
@@ -15979,37 +15664,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_thread_thr_create=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_thread_thr_create=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
-$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
-if test "x$ac_cv_lib_thread_thr_create" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
+echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
+if test $ac_cv_lib_thread_thr_create = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define WITH_THREAD 1
 _ACEOF
@@ -16062,10 +15743,10 @@
 		       ;;
       esac
 
-      { $as_echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
-$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
+      { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
+echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
       if test "${ac_cv_pthread_system_supported+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   ac_cv_pthread_system_supported=no
@@ -16095,32 +15776,29 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_pthread_system_supported=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_pthread_system_supported=no
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
@@ -16128,8 +15806,8 @@
 
 fi
 
-      { $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
-$as_echo "$ac_cv_pthread_system_supported" >&6; }
+      { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
+echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
       if test "$ac_cv_pthread_system_supported" = "yes"; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -16140,11 +15818,11 @@
 
 for ac_func in pthread_sigmask
 do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
+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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -16197,42 +15875,35 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   eval "$as_ac_var=yes"
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	eval "$as_ac_var=no"
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
  case $ac_sys_system in
         CYGWIN*)
@@ -16252,18 +15923,18 @@
 # Check for enable-ipv6
 
 
-{ $as_echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
-$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
+{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
+echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
 # Check whether --enable-ipv6 was given.
 if test "${enable_ipv6+set}" = set; then
   enableval=$enable_ipv6;  case "$enableval" in
   no)
-       { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
        ipv6=no
        ;;
-  *)   { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  *)   { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
        cat >>confdefs.h <<\_ACEOF
 #define ENABLE_IPV6 1
 _ACEOF
@@ -16274,8 +15945,8 @@
 else
 
   if test "$cross_compiling" = yes; then
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
   ipv6=no
 
 else
@@ -16303,44 +15974,41 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
   ipv6=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
-{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
   ipv6=no
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 
 if test "$ipv6" = "yes"; then
-	{ $as_echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
-$as_echo_n "checking if RFC2553 API is available... " >&6; }
+	{ echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
+echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
 	cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -16364,27 +16032,26 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 		ipv6=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 		ipv6=no
 fi
 
@@ -16406,8 +16073,8 @@
 ipv6trylibc=no
 
 if test "$ipv6" = "yes"; then
-	{ $as_echo "$as_me:$LINENO: checking ipv6 stack type" >&5
-$as_echo_n "checking ipv6 stack type... " >&6; }
+	{ echo "$as_me:$LINENO: checking ipv6 stack type" >&5
+echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
 	for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
 	do
 		case $i in
@@ -16563,8 +16230,8 @@
 			break
 		fi
 	done
-	{ $as_echo "$as_me:$LINENO: result: $ipv6type" >&5
-$as_echo "$ipv6type" >&6; }
+	{ echo "$as_me:$LINENO: result: $ipv6type" >&5
+echo "${ECHO_T}$ipv6type" >&6; }
 fi
 
 if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
@@ -16583,8 +16250,8 @@
 	fi
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
-$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
+{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
+echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -16606,14 +16273,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -16623,22 +16289,22 @@
 #define HAVE_OSX105_SDK 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 # Check for --with-doc-strings
-{ $as_echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
-$as_echo_n "checking for --with-doc-strings... " >&6; }
+{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
+echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
 
 # Check whether --with-doc-strings was given.
 if test "${with_doc_strings+set}" = set; then
@@ -16657,12 +16323,12 @@
 _ACEOF
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $with_doc_strings" >&5
-$as_echo "$with_doc_strings" >&6; }
+{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
+echo "${ECHO_T}$with_doc_strings" >&6; }
 
 # Check for Python-specific malloc support
-{ $as_echo "$as_me:$LINENO: checking for --with-tsc" >&5
-$as_echo_n "checking for --with-tsc... " >&6; }
+{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
+echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
 
 # Check whether --with-tsc was given.
 if test "${with_tsc+set}" = set; then
@@ -16674,20 +16340,20 @@
 #define WITH_TSC 1
 _ACEOF
 
-    { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-else { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+    { 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
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
 # Check for Python-specific malloc support
-{ $as_echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
-$as_echo_n "checking for --with-pymalloc... " >&6; }
+{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
+echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
 
 # Check whether --with-pymalloc was given.
 if test "${with_pymalloc+set}" = set; then
@@ -16706,12 +16372,12 @@
 _ACEOF
 
 fi
-{ $as_echo "$as_me:$LINENO: result: $with_pymalloc" >&5
-$as_echo "$with_pymalloc" >&6; }
+{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
+echo "${ECHO_T}$with_pymalloc" >&6; }
 
 # Check for --with-wctype-functions
-{ $as_echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
-$as_echo_n "checking for --with-wctype-functions... " >&6; }
+{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
+echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
 
 # Check whether --with-wctype-functions was given.
 if test "${with_wctype_functions+set}" = set; then
@@ -16723,14 +16389,14 @@
 #define WANT_WCTYPE_FUNCTIONS 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-else { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { 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
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
@@ -16743,11 +16409,11 @@
 
 for ac_func in dlopen
 do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
+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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -16800,42 +16466,35 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   eval "$as_ac_var=yes"
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	eval "$as_ac_var=no"
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -16845,8 +16504,8 @@
 # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
 # loading of modules.
 
-{ $as_echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
-$as_echo_n "checking DYNLOADFILE... " >&6; }
+{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
+echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
 if test -z "$DYNLOADFILE"
 then
 	case $ac_sys_system/$ac_sys_release in
@@ -16871,8 +16530,8 @@
 	;;
 	esac
 fi
-{ $as_echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
-$as_echo "$DYNLOADFILE" >&6; }
+{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
+echo "${ECHO_T}$DYNLOADFILE" >&6; }
 if test "$DYNLOADFILE" != "dynload_stub.o"
 then
 
@@ -16885,16 +16544,16 @@
 # MACHDEP_OBJS can be set to platform-specific object files needed by Python
 
 
-{ $as_echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
-$as_echo_n "checking MACHDEP_OBJS... " >&6; }
+{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
+echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
 if test -z "$MACHDEP_OBJS"
 then
 	MACHDEP_OBJS=$extra_machdep_objs
 else
 	MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
 fi
-{ $as_echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
-$as_echo "MACHDEP_OBJS" >&6; }
+{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
+echo "${ECHO_T}MACHDEP_OBJS" >&6; }
 
 # checks for library functions
 
@@ -16996,11 +16655,11 @@
  sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
  truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
 do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
+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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -17053,42 +16712,35 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   eval "$as_ac_var=yes"
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	eval "$as_ac_var=no"
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -17097,8 +16749,8 @@
 
 # For some functions, having a definition is not sufficient, since
 # we want to take their address.
-{ $as_echo "$as_me:$LINENO: checking for chroot" >&5
-$as_echo_n "checking for chroot... " >&6; }
+{ echo "$as_me:$LINENO: checking for chroot" >&5
+echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -17120,14 +16772,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -17137,20 +16788,20 @@
 #define HAVE_CHROOT 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: checking for link" >&5
-$as_echo_n "checking for link... " >&6; }
+{ echo "$as_me:$LINENO: checking for link" >&5
+echo $ECHO_N "checking for link... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -17172,14 +16823,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -17189,20 +16839,20 @@
 #define HAVE_LINK 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: checking for symlink" >&5
-$as_echo_n "checking for symlink... " >&6; }
+{ echo "$as_me:$LINENO: checking for symlink" >&5
+echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -17224,14 +16874,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -17241,20 +16890,20 @@
 #define HAVE_SYMLINK 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: checking for fchdir" >&5
-$as_echo_n "checking for fchdir... " >&6; }
+{ echo "$as_me:$LINENO: checking for fchdir" >&5
+echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -17276,14 +16925,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -17293,20 +16941,20 @@
 #define HAVE_FCHDIR 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: checking for fsync" >&5
-$as_echo_n "checking for fsync... " >&6; }
+{ echo "$as_me:$LINENO: checking for fsync" >&5
+echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -17328,14 +16976,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -17345,20 +16992,20 @@
 #define HAVE_FSYNC 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: checking for fdatasync" >&5
-$as_echo_n "checking for fdatasync... " >&6; }
+{ echo "$as_me:$LINENO: checking for fdatasync" >&5
+echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -17380,14 +17027,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -17397,20 +17043,20 @@
 #define HAVE_FDATASYNC 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: checking for epoll" >&5
-$as_echo_n "checking for epoll... " >&6; }
+{ echo "$as_me:$LINENO: checking for epoll" >&5
+echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -17432,14 +17078,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -17449,20 +17094,20 @@
 #define HAVE_EPOLL 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: checking for kqueue" >&5
-$as_echo_n "checking for kqueue... " >&6; }
+{ echo "$as_me:$LINENO: checking for kqueue" >&5
+echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -17487,14 +17132,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -17504,14 +17148,14 @@
 #define HAVE_KQUEUE 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
@@ -17522,8 +17166,8 @@
 # address to avoid compiler warnings and potential miscompilations
 # because of the missing prototypes.
 
-{ $as_echo "$as_me:$LINENO: checking for ctermid_r" >&5
-$as_echo_n "checking for ctermid_r... " >&6; }
+{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
+echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -17548,14 +17192,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -17565,21 +17208,21 @@
 #define HAVE_CTERMID_R 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-{ $as_echo "$as_me:$LINENO: checking for flock" >&5
-$as_echo_n "checking for flock... " >&6; }
+{ echo "$as_me:$LINENO: checking for flock" >&5
+echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -17604,14 +17247,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -17621,21 +17263,21 @@
 #define HAVE_FLOCK 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-{ $as_echo "$as_me:$LINENO: checking for getpagesize" >&5
-$as_echo_n "checking for getpagesize... " >&6; }
+{ echo "$as_me:$LINENO: checking for getpagesize" >&5
+echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -17660,14 +17302,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -17677,14 +17318,14 @@
 #define HAVE_GETPAGESIZE 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
@@ -17694,10 +17335,10 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
 if test "${ac_cv_prog_TRUE+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test -n "$TRUE"; then
   ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
@@ -17710,7 +17351,7 @@
   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_TRUE="$ac_prog"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
@@ -17721,11 +17362,11 @@
 fi
 TRUE=$ac_cv_prog_TRUE
 if test -n "$TRUE"; then
-  { $as_echo "$as_me:$LINENO: result: $TRUE" >&5
-$as_echo "$TRUE" >&6; }
+  { echo "$as_me:$LINENO: result: $TRUE" >&5
+echo "${ECHO_T}$TRUE" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
@@ -17734,10 +17375,10 @@
 test -n "$TRUE" || TRUE="/bin/true"
 
 
-{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
-$as_echo_n "checking for inet_aton in -lc... " >&6; }
+{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
+echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
 if test "${ac_cv_lib_c_inet_aton+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lc  $LIBS"
@@ -17769,44 +17410,40 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_c_inet_aton=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_c_inet_aton=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
-$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
-if test "x$ac_cv_lib_c_inet_aton" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
+echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
+if test $ac_cv_lib_c_inet_aton = yes; then
   $ac_cv_prog_TRUE
 else
 
-{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
-$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
+{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
+echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
 if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lresolv  $LIBS"
@@ -17838,37 +17475,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_resolv_inet_aton=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_resolv_inet_aton=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
-$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
-if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
+if test $ac_cv_lib_resolv_inet_aton = yes; then
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBRESOLV 1
 _ACEOF
@@ -17883,16 +17516,14 @@
 
 # On Tru64, chflags seems to be present, but calling it will
 # exit Python
-{ $as_echo "$as_me:$LINENO: checking for chflags" >&5
-$as_echo_n "checking for chflags... " >&6; }
+{ echo "$as_me:$LINENO: checking for chflags" >&5
+echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
 if test "$cross_compiling" = yes; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run test program while cross compiling
+echo "$as_me: error: cannot run test program while cross compiling
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+   { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -17917,55 +17548,50 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_CHFLAGS 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
-{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for lchflags" >&5
-$as_echo_n "checking for lchflags... " >&6; }
+{ echo "$as_me:$LINENO: checking for lchflags" >&5
+echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
 if test "$cross_compiling" = yes; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run test program while cross compiling
+echo "$as_me: error: cannot run test program while cross compiling
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+   { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -17990,40 +17616,37 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_LCHFLAGS 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
-{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
@@ -18038,10 +17661,10 @@
 	;;
 esac
 
-{ $as_echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
-$as_echo_n "checking for inflateCopy in -lz... " >&6; }
+{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
+echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
 if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lz  $LIBS"
@@ -18073,37 +17696,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_z_inflateCopy=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_z_inflateCopy=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
-$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
-if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
+echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
+if test $ac_cv_lib_z_inflateCopy = yes; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_ZLIB_COPY 1
@@ -18119,8 +17738,8 @@
 	;;
 esac
 
-{ $as_echo "$as_me:$LINENO: checking for hstrerror" >&5
-$as_echo_n "checking for hstrerror... " >&6; }
+{ echo "$as_me:$LINENO: checking for hstrerror" >&5
+echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -18145,43 +17764,39 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_HSTRERROR 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 
-{ $as_echo "$as_me:$LINENO: checking for inet_aton" >&5
-$as_echo_n "checking for inet_aton... " >&6; }
+{ echo "$as_me:$LINENO: checking for inet_aton" >&5
+echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -18209,43 +17824,39 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_INET_ATON 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 
-{ $as_echo "$as_me:$LINENO: checking for inet_pton" >&5
-$as_echo_n "checking for inet_pton... " >&6; }
+{ echo "$as_me:$LINENO: checking for inet_pton" >&5
+echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -18273,14 +17884,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -18290,22 +17900,22 @@
 #define HAVE_INET_PTON 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 # On some systems, setgroups is in unistd.h, on others, in grp.h
-{ $as_echo "$as_me:$LINENO: checking for setgroups" >&5
-$as_echo_n "checking for setgroups... " >&6; }
+{ echo "$as_me:$LINENO: checking for setgroups" >&5
+echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -18333,14 +17943,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -18350,14 +17959,14 @@
 #define HAVE_SETGROUPS 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
@@ -18368,11 +17977,11 @@
 
 for ac_func in openpty
 do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
+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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -18425,49 +18034,42 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   eval "$as_ac_var=yes"
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	eval "$as_ac_var=no"
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 else
-  { $as_echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
-$as_echo_n "checking for openpty in -lutil... " >&6; }
+  { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
+echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
 if test "${ac_cv_lib_util_openpty+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lutil  $LIBS"
@@ -18499,46 +18101,42 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_util_openpty=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_util_openpty=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
-$as_echo "$ac_cv_lib_util_openpty" >&6; }
-if test "x$ac_cv_lib_util_openpty" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
+echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
+if test $ac_cv_lib_util_openpty = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define HAVE_OPENPTY 1
 _ACEOF
  LIBS="$LIBS -lutil"
 else
-  { $as_echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
-$as_echo_n "checking for openpty in -lbsd... " >&6; }
+  { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
+echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
 if test "${ac_cv_lib_bsd_openpty+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lbsd  $LIBS"
@@ -18570,37 +18168,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_bsd_openpty=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_bsd_openpty=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
-$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
-if test "x$ac_cv_lib_bsd_openpty" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
+echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
+if test $ac_cv_lib_bsd_openpty = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define HAVE_OPENPTY 1
 _ACEOF
@@ -18617,11 +18211,11 @@
 
 for ac_func in forkpty
 do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
+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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -18674,49 +18268,42 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   eval "$as_ac_var=yes"
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	eval "$as_ac_var=no"
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 else
-  { $as_echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
-$as_echo_n "checking for forkpty in -lutil... " >&6; }
+  { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
+echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
 if test "${ac_cv_lib_util_forkpty+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lutil  $LIBS"
@@ -18748,46 +18335,42 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_util_forkpty=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_util_forkpty=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
-$as_echo "$ac_cv_lib_util_forkpty" >&6; }
-if test "x$ac_cv_lib_util_forkpty" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
+echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
+if test $ac_cv_lib_util_forkpty = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define HAVE_FORKPTY 1
 _ACEOF
  LIBS="$LIBS -lutil"
 else
-  { $as_echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
-$as_echo_n "checking for forkpty in -lbsd... " >&6; }
+  { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
+echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
 if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lbsd  $LIBS"
@@ -18819,37 +18402,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_bsd_forkpty=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_bsd_forkpty=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
-$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
-if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
+echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
+if test $ac_cv_lib_bsd_forkpty = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define HAVE_FORKPTY 1
 _ACEOF
@@ -18868,11 +18447,11 @@
 
 for ac_func in memmove
 do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
+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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -18925,42 +18504,35 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   eval "$as_ac_var=yes"
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	eval "$as_ac_var=no"
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -18976,11 +18548,11 @@
 
 for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
 do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
+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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -19033,42 +18605,35 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   eval "$as_ac_var=yes"
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	eval "$as_ac_var=no"
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -19080,11 +18645,11 @@
 
 for ac_func in dup2 getcwd strdup
 do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
+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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -19137,42 +18702,35 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   eval "$as_ac_var=yes"
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	eval "$as_ac_var=no"
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 else
@@ -19189,11 +18747,11 @@
 
 for ac_func in getpgrp
 do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
+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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -19246,42 +18804,35 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   eval "$as_ac_var=yes"
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	eval "$as_ac_var=no"
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -19304,14 +18855,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -19323,7 +18873,7 @@
 
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
@@ -19337,11 +18887,11 @@
 
 for ac_func in setpgrp
 do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
+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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -19394,42 +18944,35 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   eval "$as_ac_var=yes"
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	eval "$as_ac_var=no"
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -19452,14 +18995,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -19471,7 +19013,7 @@
 
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
@@ -19485,11 +19027,11 @@
 
 for ac_func in gettimeofday
 do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
+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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -19542,42 +19084,35 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   eval "$as_ac_var=yes"
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	eval "$as_ac_var=no"
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -19600,21 +19135,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
@@ -19631,8 +19165,8 @@
 done
 
 
-{ $as_echo "$as_me:$LINENO: checking for major" >&5
-$as_echo_n "checking for major... " >&6; }
+{ echo "$as_me:$LINENO: checking for major" >&5
+echo $ECHO_N "checking for major... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -19664,48 +19198,44 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
 
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_DEVICE_MACROS 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 
 # On OSF/1 V5.1, getaddrinfo is available, but a define
 # for [no]getaddrinfo in netdb.h.
-{ $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5
-$as_echo_n "checking for getaddrinfo... " >&6; }
+{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
+echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -19734,29 +19264,26 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
 
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-{ $as_echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
-$as_echo_n "checking getaddrinfo bug... " >&6; }
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
+echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
 if test "$cross_compiling" = yes; then
-  { $as_echo "$as_me:$LINENO: result: buggy" >&5
-$as_echo "buggy" >&6; }
+  { echo "$as_me:$LINENO: result: buggy" >&5
+echo "${ECHO_T}buggy" >&6; }
 buggygetaddrinfo=yes
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -19859,52 +19386,48 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  { $as_echo "$as_me:$LINENO: result: good" >&5
-$as_echo "good" >&6; }
+  { echo "$as_me:$LINENO: result: good" >&5
+echo "${ECHO_T}good" >&6; }
 buggygetaddrinfo=no
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
-{ $as_echo "$as_me:$LINENO: result: buggy" >&5
-$as_echo "buggy" >&6; }
+{ echo "$as_me:$LINENO: result: buggy" >&5
+echo "${ECHO_T}buggy" >&6; }
 buggygetaddrinfo=yes
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 buggygetaddrinfo=yes
 
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 
@@ -19924,11 +19447,11 @@
 
 for ac_func in getnameinfo
 do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
+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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -19981,42 +19504,35 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   eval "$as_ac_var=yes"
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	eval "$as_ac_var=no"
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -20024,10 +19540,10 @@
 
 
 # checks for structures
-{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
 if test "${ac_cv_header_time+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -20054,21 +19570,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_time=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_header_time=no
@@ -20076,8 +19591,8 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
-$as_echo "$ac_cv_header_time" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6; }
 if test $ac_cv_header_time = yes; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -20086,10 +19601,10 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
-$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
+echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
 if test "${ac_cv_struct_tm+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -20105,7 +19620,7 @@
 {
 struct tm tm;
 				     int *p = &tm.tm_sec;
-				     return !p;
+ 				     return !p;
   ;
   return 0;
 }
@@ -20116,21 +19631,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_struct_tm=time.h
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_struct_tm=sys/time.h
@@ -20138,8 +19652,8 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
-$as_echo "$ac_cv_struct_tm" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
+echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
 if test $ac_cv_struct_tm = sys/time.h; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -20148,10 +19662,10 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
-$as_echo_n "checking for struct tm.tm_zone... " >&6; }
+{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
+echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -20179,21 +19693,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   ac_cv_member_struct_tm_tm_zone=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -20222,21 +19735,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   ac_cv_member_struct_tm_tm_zone=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_member_struct_tm_tm_zone=no
@@ -20247,9 +19759,9 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
-$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
-if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
+echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
+if test $ac_cv_member_struct_tm_tm_zone = yes; then
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_STRUCT_TM_TM_ZONE 1
@@ -20265,10 +19777,10 @@
 _ACEOF
 
 else
-  { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5
-$as_echo_n "checking whether tzname is declared... " >&6; }
+  { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
+echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
 if test "${ac_cv_have_decl_tzname+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -20295,21 +19807,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_have_decl_tzname=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_have_decl_tzname=no
@@ -20317,9 +19828,9 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
-$as_echo "$ac_cv_have_decl_tzname" >&6; }
-if test "x$ac_cv_have_decl_tzname" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
+echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
+if test $ac_cv_have_decl_tzname = yes; then
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_TZNAME 1
@@ -20335,10 +19846,10 @@
 fi
 
 
-  { $as_echo "$as_me:$LINENO: checking for tzname" >&5
-$as_echo_n "checking for tzname... " >&6; }
+  { echo "$as_me:$LINENO: checking for tzname" >&5
+echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
 if test "${ac_cv_var_tzname+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -20365,35 +19876,31 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_var_tzname=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_var_tzname=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
-$as_echo "$ac_cv_var_tzname" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
+echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
   if test $ac_cv_var_tzname = yes; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -20403,10 +19910,10 @@
   fi
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
-$as_echo_n "checking for struct stat.st_rdev... " >&6; }
+{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
+echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
 if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -20431,21 +19938,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   ac_cv_member_struct_stat_st_rdev=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -20471,21 +19977,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   ac_cv_member_struct_stat_st_rdev=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_member_struct_stat_st_rdev=no
@@ -20496,9 +20001,9 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
-$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; }
-if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
+if test $ac_cv_member_struct_stat_st_rdev = yes; then
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_STRUCT_STAT_ST_RDEV 1
@@ -20507,10 +20012,10 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
-$as_echo_n "checking for struct stat.st_blksize... " >&6; }
+{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
+echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -20535,21 +20040,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   ac_cv_member_struct_stat_st_blksize=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -20575,21 +20079,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   ac_cv_member_struct_stat_st_blksize=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_member_struct_stat_st_blksize=no
@@ -20600,9 +20103,9 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
-$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; }
-if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
+if test $ac_cv_member_struct_stat_st_blksize = yes; then
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
@@ -20611,10 +20114,10 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
-$as_echo_n "checking for struct stat.st_flags... " >&6; }
+{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
+echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
 if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -20639,21 +20142,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   ac_cv_member_struct_stat_st_flags=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -20679,21 +20181,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   ac_cv_member_struct_stat_st_flags=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_member_struct_stat_st_flags=no
@@ -20704,9 +20205,9 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
-$as_echo "$ac_cv_member_struct_stat_st_flags" >&6; }
-if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
+if test $ac_cv_member_struct_stat_st_flags = yes; then
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_STRUCT_STAT_ST_FLAGS 1
@@ -20715,10 +20216,10 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
-$as_echo_n "checking for struct stat.st_gen... " >&6; }
+{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
+echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
 if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -20743,21 +20244,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   ac_cv_member_struct_stat_st_gen=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -20783,21 +20283,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   ac_cv_member_struct_stat_st_gen=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_member_struct_stat_st_gen=no
@@ -20808,9 +20307,9 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
-$as_echo "$ac_cv_member_struct_stat_st_gen" >&6; }
-if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
+if test $ac_cv_member_struct_stat_st_gen = yes; then
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_STRUCT_STAT_ST_GEN 1
@@ -20819,10 +20318,10 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
-$as_echo_n "checking for struct stat.st_birthtime... " >&6; }
+{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
+echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
 if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -20847,21 +20346,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   ac_cv_member_struct_stat_st_birthtime=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -20887,21 +20385,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   ac_cv_member_struct_stat_st_birthtime=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_member_struct_stat_st_birthtime=no
@@ -20912,9 +20409,9 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
-$as_echo "$ac_cv_member_struct_stat_st_birthtime" >&6; }
-if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
+if test $ac_cv_member_struct_stat_st_birthtime = yes; then
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
@@ -20923,10 +20420,10 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
-$as_echo_n "checking for struct stat.st_blocks... " >&6; }
+{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
+echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
 if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -20951,21 +20448,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   ac_cv_member_struct_stat_st_blocks=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -20991,21 +20487,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   ac_cv_member_struct_stat_st_blocks=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_member_struct_stat_st_blocks=no
@@ -21016,9 +20511,9 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
-$as_echo "$ac_cv_member_struct_stat_st_blocks" >&6; }
-if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
+if test $ac_cv_member_struct_stat_st_blocks = yes; then
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
@@ -21040,10 +20535,10 @@
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
-$as_echo_n "checking for time.h that defines altzone... " >&6; }
+{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
+echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
 if test "${ac_cv_header_time_altzone+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -21066,21 +20561,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_time_altzone=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_header_time_altzone=no
@@ -21089,8 +20583,8 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
-$as_echo "$ac_cv_header_time_altzone" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
+echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
 if test $ac_cv_header_time_altzone = yes; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -21100,8 +20594,8 @@
 fi
 
 was_it_defined=no
-{ $as_echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
-$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
+{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21127,14 +20621,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -21148,20 +20641,20 @@
   was_it_defined=yes
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  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
-{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5
-$as_echo "$was_it_defined" >&6; }
+{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
+echo "${ECHO_T}$was_it_defined" >&6; }
 
-{ $as_echo "$as_me:$LINENO: checking for addrinfo" >&5
-$as_echo_n "checking for addrinfo... " >&6; }
+{ echo "$as_me:$LINENO: checking for addrinfo" >&5
+echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
 if test "${ac_cv_struct_addrinfo+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -21185,21 +20678,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_struct_addrinfo=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_struct_addrinfo=no
@@ -21208,8 +20700,8 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
-$as_echo "$ac_cv_struct_addrinfo" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
+echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
 if test $ac_cv_struct_addrinfo = yes; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -21218,10 +20710,10 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
-$as_echo_n "checking for sockaddr_storage... " >&6; }
+{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
+echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
 if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -21246,21 +20738,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_struct_sockaddr_storage=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_struct_sockaddr_storage=no
@@ -21269,8 +20760,8 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
-$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
+echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
 if test $ac_cv_struct_sockaddr_storage = yes; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -21282,10 +20773,10 @@
 # checks for compiler characteristics
 
 
-{ $as_echo "$as_me:$LINENO: checking whether char is unsigned" >&5
-$as_echo_n "checking whether char is unsigned... " >&6; }
+{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
+echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
 if test "${ac_cv_c_char_unsigned+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -21310,21 +20801,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_c_char_unsigned=no
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_c_char_unsigned=yes
@@ -21332,8 +20822,8 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
-$as_echo "$ac_cv_c_char_unsigned" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
+echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
   cat >>confdefs.h <<\_ACEOF
 #define __CHAR_UNSIGNED__ 1
@@ -21341,10 +20831,10 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
 if test "${ac_cv_c_const+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -21416,21 +20906,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_c_const=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_c_const=no
@@ -21438,20 +20927,20 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6; }
 if test $ac_cv_c_const = no; then
 
 cat >>confdefs.h <<\_ACEOF
-#define const /**/
+#define const
 _ACEOF
 
 fi
 
 
 works=no
-{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5
-$as_echo_n "checking for working volatile... " >&6; }
+{ echo "$as_me:$LINENO: checking for working volatile" >&5
+echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21473,38 +20962,37 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
   works=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
 cat >>confdefs.h <<\_ACEOF
-#define volatile /**/
+#define volatile
 _ACEOF
 
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $works" >&5
-$as_echo "$works" >&6; }
+{ echo "$as_me:$LINENO: result: $works" >&5
+echo "${ECHO_T}$works" >&6; }
 
 works=no
-{ $as_echo "$as_me:$LINENO: checking for working signed char" >&5
-$as_echo_n "checking for working signed char... " >&6; }
+{ echo "$as_me:$LINENO: checking for working signed char" >&5
+echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21526,38 +21014,37 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
   works=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
 cat >>confdefs.h <<\_ACEOF
-#define signed /**/
+#define signed
 _ACEOF
 
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $works" >&5
-$as_echo "$works" >&6; }
+{ echo "$as_me:$LINENO: result: $works" >&5
+echo "${ECHO_T}$works" >&6; }
 
 have_prototypes=no
-{ $as_echo "$as_me:$LINENO: checking for prototypes" >&5
-$as_echo_n "checking for prototypes... " >&6; }
+{ echo "$as_me:$LINENO: checking for prototypes" >&5
+echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21579,14 +21066,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -21600,19 +21086,19 @@
   have_prototypes=yes
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  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
-{ $as_echo "$as_me:$LINENO: result: $have_prototypes" >&5
-$as_echo "$have_prototypes" >&6; }
+{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
+echo "${ECHO_T}$have_prototypes" >&6; }
 
 works=no
-{ $as_echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
-$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
+{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
+echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21644,14 +21130,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -21665,19 +21150,19 @@
   works=yes
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  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
-{ $as_echo "$as_me:$LINENO: result: $works" >&5
-$as_echo "$works" >&6; }
+{ echo "$as_me:$LINENO: result: $works" >&5
+echo "${ECHO_T}$works" >&6; }
 
 # check for socketpair
-{ $as_echo "$as_me:$LINENO: checking for socketpair" >&5
-$as_echo_n "checking for socketpair... " >&6; }
+{ echo "$as_me:$LINENO: checking for socketpair" >&5
+echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21702,14 +21187,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -21719,22 +21203,22 @@
 #define HAVE_SOCKETPAIR 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 # check if sockaddr has sa_len member
-{ $as_echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
-$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
+{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
+echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21758,38 +21242,37 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_SOCKADDR_SA_LEN 1
 _ACEOF
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 va_list_is_array=no
-{ $as_echo "$as_me:$LINENO: checking whether va_list is an array" >&5
-$as_echo_n "checking whether va_list is an array... " >&6; }
+{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
+echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -21817,21 +21300,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
@@ -21845,17 +21327,17 @@
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $va_list_is_array" >&5
-$as_echo "$va_list_is_array" >&6; }
+{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
+echo "${ECHO_T}$va_list_is_array" >&6; }
 
 # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
-$as_echo_n "checking for gethostbyname_r... " >&6; }
+{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
+echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
 if test "${ac_cv_func_gethostbyname_r+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -21908,43 +21390,39 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_func_gethostbyname_r=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_func_gethostbyname_r=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
-$as_echo "$ac_cv_func_gethostbyname_r" >&6; }
-if test "x$ac_cv_func_gethostbyname_r" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
+echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
+if test $ac_cv_func_gethostbyname_r = yes; then
 
   cat >>confdefs.h <<\_ACEOF
 #define HAVE_GETHOSTBYNAME_R 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
-$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
+  { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
+echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
   OLD_CFLAGS=$CFLAGS
   CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
   cat >conftest.$ac_ext <<_ACEOF
@@ -21978,14 +21456,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -22000,18 +21477,18 @@
 #define HAVE_GETHOSTBYNAME_R_6_ARG 1
 _ACEOF
 
-    { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-    { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-    { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
-$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
+echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
     cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -22043,14 +21520,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -22065,18 +21541,18 @@
 #define HAVE_GETHOSTBYNAME_R_5_ARG 1
 _ACEOF
 
-      { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+      { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-      { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-      { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
-$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
+      { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+      { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
+echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
       cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -22106,14 +21582,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -22128,16 +21603,16 @@
 #define HAVE_GETHOSTBYNAME_R_3_ARG 1
 _ACEOF
 
-        { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-        { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+        { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
@@ -22157,11 +21632,11 @@
 
 for ac_func in gethostbyname
 do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
+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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -22214,42 +21689,35 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   eval "$as_ac_var=yes"
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	eval "$as_ac_var=no"
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -22268,10 +21736,10 @@
 # (none yet)
 
 # Linux requires this for correct f.p. operations
-{ $as_echo "$as_me:$LINENO: checking for __fpu_control" >&5
-$as_echo_n "checking for __fpu_control... " >&6; }
+{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
+echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
 if test "${ac_cv_func___fpu_control+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -22324,43 +21792,39 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_func___fpu_control=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_func___fpu_control=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
-$as_echo "$ac_cv_func___fpu_control" >&6; }
-if test "x$ac_cv_func___fpu_control" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
+echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
+if test $ac_cv_func___fpu_control = yes; then
   :
 else
 
-{ $as_echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
-$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
+{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
+echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
 if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lieee  $LIBS"
@@ -22392,37 +21856,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_ieee___fpu_control=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_ieee___fpu_control=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
-$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
-if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
+echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
+if test $ac_cv_lib_ieee___fpu_control = yes; then
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBIEEE 1
 _ACEOF
@@ -22436,8 +21896,8 @@
 
 
 # Check for --with-fpectl
-{ $as_echo "$as_me:$LINENO: checking for --with-fpectl" >&5
-$as_echo_n "checking for --with-fpectl... " >&6; }
+{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
+echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
 
 # Check whether --with-fpectl was given.
 if test "${with_fpectl+set}" = set; then
@@ -22449,14 +21909,14 @@
 #define WANT_SIGFPE_HANDLER 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-else { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { 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
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
 
@@ -22467,53 +21927,53 @@
 BeOS) ;;
 *) LIBM=-lm
 esac
-{ $as_echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
-$as_echo_n "checking for --with-libm=STRING... " >&6; }
+{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
+echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
 
 # Check whether --with-libm was given.
 if test "${with_libm+set}" = set; then
   withval=$with_libm;
 if test "$withval" = no
 then LIBM=
-     { $as_echo "$as_me:$LINENO: result: force LIBM empty" >&5
-$as_echo "force LIBM empty" >&6; }
+     { echo "$as_me:$LINENO: result: force LIBM empty" >&5
+echo "${ECHO_T}force LIBM empty" >&6; }
 elif test "$withval" != yes
 then LIBM=$withval
-     { $as_echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
-$as_echo "set LIBM=\"$withval\"" >&6; }
-else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
-$as_echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
+     { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
+echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
+else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
+echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
    { (exit 1); exit 1; }; }
 fi
 else
-  { $as_echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
-$as_echo "default LIBM=\"$LIBM\"" >&6; }
+  { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
+echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
 fi
 
 
 # check for --with-libc=...
 
-{ $as_echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
-$as_echo_n "checking for --with-libc=STRING... " >&6; }
+{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
+echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
 
 # Check whether --with-libc was given.
 if test "${with_libc+set}" = set; then
   withval=$with_libc;
 if test "$withval" = no
 then LIBC=
-     { $as_echo "$as_me:$LINENO: result: force LIBC empty" >&5
-$as_echo "force LIBC empty" >&6; }
+     { echo "$as_me:$LINENO: result: force LIBC empty" >&5
+echo "${ECHO_T}force LIBC empty" >&6; }
 elif test "$withval" != yes
 then LIBC=$withval
-     { $as_echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
-$as_echo "set LIBC=\"$withval\"" >&6; }
-else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
-$as_echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
+     { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
+echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
+else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
+echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
    { (exit 1); exit 1; }; }
 fi
 else
-  { $as_echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
-$as_echo "default LIBC=\"$LIBC\"" >&6; }
+  { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
+echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
 fi
 
 
@@ -22529,10 +21989,10 @@
 # IEEE 754 platforms.  On IEEE 754, test should return 1 if rounding
 # mode is round-to-nearest and double rounding issues are present, and
 # 0 otherwise.  See http://bugs.python.org/issue2937 for more info.
-{ $as_echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
-$as_echo_n "checking for x87-style double rounding... " >&6; }
+{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
+echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
 if test "${ac_cv_x87_double_rounding+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 if test "$cross_compiling" = yes; then
@@ -22571,40 +22031,37 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_x87_double_rounding=no
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_x87_double_rounding=yes
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
-$as_echo "$ac_cv_x87_double_rounding" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
+echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
 if test "$ac_cv_x87_double_rounding" = yes
 then
 
@@ -22615,16 +22072,14 @@
 fi
 
 # Multiprocessing check for broken sem_getvalue
-{ $as_echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
-$as_echo_n "checking for broken sem_getvalue... " >&6; }
+{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
+echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
 if test "$cross_compiling" = yes; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run test program while cross compiling
+echo "$as_me: error: cannot run test program while cross compiling
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+   { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -22661,32 +22116,30 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_BROKEN_SEM_GETVALUE 1
@@ -22694,7 +22147,6 @@
 
 
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
@@ -22702,10 +22154,10 @@
 
 # On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
 # -0. on some architectures.
-{ $as_echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
-$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
+{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
+echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
 if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 if test "$cross_compiling" = yes; then
@@ -22736,40 +22188,37 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_tanh_preserves_zero_sign=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_tanh_preserves_zero_sign=no
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
-$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
+echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
 if test "$ac_cv_tanh_preserves_zero_sign" = yes
 then
 
@@ -22790,11 +22239,11 @@
 
 for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
 do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
+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
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -22847,51 +22296,44 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   eval "$as_ac_var=yes"
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	eval "$as_ac_var=no"
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
-		 $as_echo "$as_val"'`
-   if test "x$as_val" = x""yes; then
+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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 done
 
-{ $as_echo "$as_me:$LINENO: checking whether isinf is declared" >&5
-$as_echo_n "checking whether isinf is declared... " >&6; }
+{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
+echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
 if test "${ac_cv_have_decl_isinf+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -22918,21 +22360,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_have_decl_isinf=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_have_decl_isinf=no
@@ -22940,9 +22381,9 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
-$as_echo "$ac_cv_have_decl_isinf" >&6; }
-if test "x$ac_cv_have_decl_isinf" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
+echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
+if test $ac_cv_have_decl_isinf = yes; then
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_ISINF 1
@@ -22956,10 +22397,10 @@
 
 
 fi
-{ $as_echo "$as_me:$LINENO: checking whether isnan is declared" >&5
-$as_echo_n "checking whether isnan is declared... " >&6; }
+{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
+echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
 if test "${ac_cv_have_decl_isnan+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -22986,21 +22427,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_have_decl_isnan=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_have_decl_isnan=no
@@ -23008,9 +22448,9 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
-$as_echo "$ac_cv_have_decl_isnan" >&6; }
-if test "x$ac_cv_have_decl_isnan" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
+echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
+if test $ac_cv_have_decl_isnan = yes; then
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_ISNAN 1
@@ -23024,10 +22464,10 @@
 
 
 fi
-{ $as_echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
-$as_echo_n "checking whether isfinite is declared... " >&6; }
+{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
+echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
 if test "${ac_cv_have_decl_isfinite+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -23054,21 +22494,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_have_decl_isfinite=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_have_decl_isfinite=no
@@ -23076,9 +22515,9 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
-$as_echo "$ac_cv_have_decl_isfinite" >&6; }
-if test "x$ac_cv_have_decl_isfinite" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
+echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
+if test $ac_cv_have_decl_isfinite = yes; then
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_ISFINITE 1
@@ -23098,8 +22537,8 @@
 LIBS=$LIBS_SAVE
 
 # determine what size digit to use for Python's longs
-{ $as_echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
-$as_echo_n "checking digit size for Python's longs... " >&6; }
+{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
+echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
 # Check whether --enable-big-digits was given.
 if test "${enable_big_digits+set}" = set; then
   enableval=$enable_big_digits; case $enable_big_digits in
@@ -23110,12 +22549,12 @@
 15|30)
   ;;
 *)
-  { { $as_echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
-$as_echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;}
+  { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
+echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;}
    { (exit 1); exit 1; }; } ;;
 esac
-{ $as_echo "$as_me:$LINENO: result: $enable_big_digits" >&5
-$as_echo "$enable_big_digits" >&6; }
+{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
+echo "${ECHO_T}$enable_big_digits" >&6; }
 
 cat >>confdefs.h <<_ACEOF
 #define PYLONG_BITS_IN_DIGIT $enable_big_digits
@@ -23123,24 +22562,24 @@
 
 
 else
-  { $as_echo "$as_me:$LINENO: result: no value specified" >&5
-$as_echo "no value specified" >&6; }
+  { echo "$as_me:$LINENO: result: no value specified" >&5
+echo "${ECHO_T}no value specified" >&6; }
 fi
 
 
 # check for wchar.h
 if test "${ac_cv_header_wchar_h+set}" = set; then
-  { $as_echo "$as_me:$LINENO: checking for wchar.h" >&5
-$as_echo_n "checking for wchar.h... " >&6; }
+  { echo "$as_me:$LINENO: checking for wchar.h" >&5
+echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_wchar_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
-$as_echo "$ac_cv_header_wchar_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
+echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
 else
   # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking wchar.h usability" >&5
-$as_echo_n "checking wchar.h usability... " >&6; }
+{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
+echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -23156,33 +22595,32 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_header_compiler=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
 
 # Is the header present?
-{ $as_echo "$as_me:$LINENO: checking wchar.h presence" >&5
-$as_echo_n "checking wchar.h presence... " >&6; }
+{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
+echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -23196,52 +22634,51 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   ac_header_preproc=no
 fi
 
 rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { $as_echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { $as_echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: wchar.h:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: wchar.h:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: wchar.h:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: wchar.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
-    { $as_echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
+    { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: wchar.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: wchar.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: wchar.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: wchar.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
     ( cat <<\_ASBOX
 ## -------------------------------------- ##
 ## Report this to http://bugs.python.org/ ##
@@ -23250,18 +22687,18 @@
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-{ $as_echo "$as_me:$LINENO: checking for wchar.h" >&5
-$as_echo_n "checking for wchar.h... " >&6; }
+{ echo "$as_me:$LINENO: checking for wchar.h" >&5
+echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_wchar_h+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_cv_header_wchar_h=$ac_header_preproc
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
-$as_echo "$ac_cv_header_wchar_h" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
+echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
 
 fi
-if test "x$ac_cv_header_wchar_h" = x""yes; then
+if test $ac_cv_header_wchar_h = yes; then
 
 
 cat >>confdefs.h <<\_ACEOF
@@ -23280,14 +22717,69 @@
 # determine wchar_t size
 if test "$wchar_h" = yes
 then
-  # The cast to long int works around a bug in the HP C Compiler
+  { echo "$as_me:$LINENO: checking for wchar_t" >&5
+echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_wchar_t+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.  */
+#include <wchar.h>
+
+typedef wchar_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_wchar_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_wchar_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
+echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
+
+# The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of wchar_t" >&5
-$as_echo_n "checking size of wchar_t... " >&6; }
+{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
+echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   if test "$cross_compiling" = yes; then
   # Depending upon the size, compute the lo and hi bounds.
@@ -23299,10 +22791,11 @@
 /* end confdefs.h.  */
 #include <wchar.h>
 
+   typedef wchar_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
 test_array [0] = 0
 
   ;
@@ -23315,14 +22808,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -23337,10 +22829,11 @@
 /* end confdefs.h.  */
 #include <wchar.h>
 
+   typedef wchar_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -23353,21 +22846,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr $ac_mid + 1`
@@ -23381,7 +22873,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -23392,10 +22884,11 @@
 /* end confdefs.h.  */
 #include <wchar.h>
 
+   typedef wchar_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
 test_array [0] = 0
 
   ;
@@ -23408,14 +22901,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -23430,10 +22922,11 @@
 /* end confdefs.h.  */
 #include <wchar.h>
 
+   typedef wchar_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -23446,21 +22939,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_lo=$ac_mid; break
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_hi=`expr '(' $ac_mid ')' - 1`
@@ -23474,7 +22966,7 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   done
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo= ac_hi=
@@ -23495,10 +22987,11 @@
 /* end confdefs.h.  */
 #include <wchar.h>
 
+   typedef wchar_t ac__type_sizeof_;
 int
 main ()
 {
-static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
 test_array [0] = 0
 
   ;
@@ -23511,21 +23004,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_hi=$ac_mid
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_lo=`expr '(' $ac_mid ')' + 1`
@@ -23536,13 +23028,11 @@
 case $ac_lo in
 ?*) ac_cv_sizeof_wchar_t=$ac_lo;;
 '') if test "$ac_cv_type_wchar_t" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (wchar_t)
+echo "$as_me: error: cannot compute sizeof (wchar_t)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_wchar_t=0
    fi ;;
@@ -23556,8 +23046,9 @@
 /* end confdefs.h.  */
 #include <wchar.h>
 
-static long int longval () { return (long int) (sizeof (wchar_t)); }
-static unsigned long int ulongval () { return (long int) (sizeof (wchar_t)); }
+   typedef wchar_t ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
 #include <stdio.h>
 #include <stdlib.h>
 int
@@ -23567,22 +23058,20 @@
   FILE *f = fopen ("conftest.val", "w");
   if (! f)
     return 1;
-  if (((long int) (sizeof (wchar_t))) < 0)
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
     {
       long int i = longval ();
-      if (i != ((long int) (sizeof (wchar_t))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%ld", i);
+      fprintf (f, "%ld\n", i);
     }
   else
     {
       unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (wchar_t))))
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
 	return 1;
-      fprintf (f, "%lu", i);
+      fprintf (f, "%lu\n", i);
     }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
   return ferror (f) || fclose (f) != 0;
 
   ;
@@ -23595,48 +23084,43 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_sizeof_wchar_t=`cat conftest.val`
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
 if test "$ac_cv_type_wchar_t" = yes; then
-     { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (wchar_t)
+echo "$as_me: error: cannot compute sizeof (wchar_t)
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }; }
+   { (exit 77); exit 77; }; }
    else
      ac_cv_sizeof_wchar_t=0
    fi
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.val
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
-$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
+echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
 
 
 
@@ -23647,8 +23131,8 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
-$as_echo_n "checking for UCS-4 tcl... " >&6; }
+{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
+echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
 have_ucs4_tcl=no
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -23675,14 +23159,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -23696,24 +23179,24 @@
   have_ucs4_tcl=yes
 
 else
-  $as_echo "$as_me: failed program was:" >&5
+  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
-{ $as_echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
-$as_echo "$have_ucs4_tcl" >&6; }
+{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
+echo "${ECHO_T}$have_ucs4_tcl" >&6; }
 
 # check whether wchar_t is signed or not
 if test "$wchar_h" = yes
 then
   # check whether wchar_t is signed or not
-  { $as_echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
-$as_echo_n "checking whether wchar_t is signed... " >&6; }
+  { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
+echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
   if test "${ac_cv_wchar_t_signed+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
   if test "$cross_compiling" = yes; then
@@ -23740,44 +23223,41 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_wchar_t_signed=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_wchar_t_signed=no
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 fi
 
-  { $as_echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
-$as_echo "$ac_cv_wchar_t_signed" >&6; }
+  { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
+echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
 fi
 
-{ $as_echo "$as_me:$LINENO: checking what type to use for unicode" >&5
-$as_echo_n "checking what type to use for unicode... " >&6; }
+{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
+echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
 # Check whether --enable-unicode was given.
 if test "${enable_unicode+set}" = set; then
   enableval=$enable_unicode;
@@ -23821,220 +23301,74 @@
 if test "$enable_unicode" = "no"
 then
   UNICODE_OBJS=""
-  { $as_echo "$as_me:$LINENO: result: not used" >&5
-$as_echo "not used" >&6; }
-else
-  UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
-
-cat >>confdefs.h <<\_ACEOF
-#define Py_USING_UNICODE 1
-_ACEOF
-
-
-  # wchar_t is only usable if it maps to an unsigned type
-  if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
-          -a "$ac_cv_wchar_t_signed" = "no"
-  then
-    PY_UNICODE_TYPE="wchar_t"
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_USABLE_WCHAR_T 1
-_ACEOF
-
-    cat >>confdefs.h <<\_ACEOF
-#define PY_UNICODE_TYPE wchar_t
-_ACEOF
-
-  elif test "$ac_cv_sizeof_short" = "$unicode_size"
-  then
-       PY_UNICODE_TYPE="unsigned short"
-       cat >>confdefs.h <<\_ACEOF
-#define PY_UNICODE_TYPE unsigned short
-_ACEOF
-
-  elif test "$ac_cv_sizeof_long" = "$unicode_size"
-  then
-       PY_UNICODE_TYPE="unsigned long"
-       cat >>confdefs.h <<\_ACEOF
-#define PY_UNICODE_TYPE unsigned long
-_ACEOF
-
-  else
-       PY_UNICODE_TYPE="no type found"
-  fi
-  { $as_echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
-$as_echo "$PY_UNICODE_TYPE" >&6; }
-fi
-
-# check for endianness
-
- { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
-$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if test "${ac_cv_c_bigendian+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_c_bigendian=unknown
-    # See if we're dealing with a universal compiler.
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifndef __APPLE_CC__
-	       not a universal capable compiler
-	     #endif
-	     typedef int dummy;
-
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-
-	# Check for potential -arch flags.  It is not universal unless
-	# there are some -arch flags.  Note that *ppc* also matches
-	# ppc64.  This check is also rather less than ideal.
-	case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
-	  *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
-	esac
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if sys/param.h defines the BYTE_ORDER macro.
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-	     #include <sys/param.h>
-
-int
-main ()
-{
-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
-		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
-		     && LITTLE_ENDIAN)
-	      bogus endian macros
-	     #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  # It does; now see whether it defined to BIG_ENDIAN or not.
-	 cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-		#include <sys/param.h>
-
-int
-main ()
-{
-#if BYTE_ORDER != BIG_ENDIAN
-		 not big endian
-		#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_c_bigendian=yes
+  { echo "$as_me:$LINENO: result: not used" >&5
+echo "${ECHO_T}not used" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
 
-	ac_cv_c_bigendian=no
-fi
+cat >>confdefs.h <<\_ACEOF
+#define Py_USING_UNICODE 1
+_ACEOF
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
+  # wchar_t is only usable if it maps to an unsigned type
+  if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
+          -a "$ac_cv_wchar_t_signed" = "no"
+  then
+    PY_UNICODE_TYPE="wchar_t"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_USABLE_WCHAR_T 1
+_ACEOF
+
+    cat >>confdefs.h <<\_ACEOF
+#define PY_UNICODE_TYPE wchar_t
+_ACEOF
+
+  elif test "$ac_cv_sizeof_short" = "$unicode_size"
+  then
+       PY_UNICODE_TYPE="unsigned short"
+       cat >>confdefs.h <<\_ACEOF
+#define PY_UNICODE_TYPE unsigned short
+_ACEOF
+
+  elif test "$ac_cv_sizeof_long" = "$unicode_size"
+  then
+       PY_UNICODE_TYPE="unsigned long"
+       cat >>confdefs.h <<\_ACEOF
+#define PY_UNICODE_TYPE unsigned long
+_ACEOF
 
+  else
+       PY_UNICODE_TYPE="no type found"
+  fi
+  { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
+echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
-      cat >conftest.$ac_ext <<_ACEOF
+# check for endianness
+{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
+if test "${ac_cv_c_bigendian+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <limits.h>
+#include <sys/types.h>
+#include <sys/param.h>
 
 int
 main ()
 {
-#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
-	      bogus endian macros
-	     #endif
+#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
+	&& BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
+ bogus endian macros
+#endif
 
   ;
   return 0;
@@ -24046,33 +23380,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  # It does; now see whether it defined to _BIG_ENDIAN or not.
-	 cat >conftest.$ac_ext <<_ACEOF
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <limits.h>
+#include <sys/types.h>
+#include <sys/param.h>
 
 int
 main ()
 {
-#ifndef _BIG_ENDIAN
-		 not big endian
-		#endif
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
 
   ;
   return 0;
@@ -24084,21 +23418,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_c_bigendian=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_c_bigendian=no
@@ -24106,44 +23439,29 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
-  $as_echo "$as_me: failed program was:" >&5
+  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
-    if test $ac_cv_c_bigendian = unknown; then
-      # Compile a test program.
-      if test "$cross_compiling" = yes; then
-  # Try to guess by grepping values from an object file.
-	 cat >conftest.$ac_ext <<_ACEOF
+	# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+  # try to guess the endianness by grepping values into an object file
+  ac_cv_c_bigendian=unknown
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-short int ascii_mm[] =
-		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-		short int ascii_ii[] =
-		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-		int use_ascii (int i) {
-		  return ascii_mm[i] + ascii_ii[i];
-		}
-		short int ebcdic_ii[] =
-		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-		short int ebcdic_mm[] =
-		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-		int use_ebcdic (int i) {
-		  return ebcdic_mm[i] + ebcdic_ii[i];
-		}
-		extern int foo;
-
+short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
 int
 main ()
 {
-return use_ascii (foo) == use_ebcdic (foo);
+ _ascii (); _ebcdic ();
   ;
   return 0;
 }
@@ -24154,31 +23472,30 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
-	      ac_cv_c_bigendian=yes
-	    fi
-	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
-	      if test "$ac_cv_c_bigendian" = unknown; then
-		ac_cv_c_bigendian=no
-	      else
-		# finding both strings is unlikely to happen, but who knows?
-		ac_cv_c_bigendian=unknown
-	      fi
-	    fi
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+  ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+  if test "$ac_cv_c_bigendian" = unknown; then
+    ac_cv_c_bigendian=no
+  else
+    # finding both strings is unlikely to happen, but who knows?
+    ac_cv_c_bigendian=unknown
+  fi
+fi
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
@@ -24197,14 +23514,14 @@
 main ()
 {
 
-	     /* Are we little or big endian?  From Harbison&Steele.  */
-	     union
-	     {
-	       long int l;
-	       char c[sizeof (long int)];
-	     } u;
-	     u.l = 1;
-	     return u.c[sizeof (long int) - 1] == 1;
+  /* Are we little or big endian?  From Harbison&Steele.  */
+  union
+  {
+    long int l;
+    char c[sizeof (long int)];
+  } u;
+  u.l = 1;
+  return u.c[sizeof (long int) - 1] == 1;
 
   ;
   return 0;
@@ -24216,70 +23533,63 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_c_bigendian=no
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_c_bigendian=yes
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
-    fi
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
-$as_echo "$ac_cv_c_bigendian" >&6; }
- case $ac_cv_c_bigendian in #(
-   yes)
-     cat >>confdefs.h <<\_ACEOF
-#define WORDS_BIGENDIAN 1
-_ACEOF
-;; #(
-   no)
-      ;; #(
-   universal)
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
+case $ac_cv_c_bigendian in
+  yes)
 
 cat >>confdefs.h <<\_ACEOF
-#define AC_APPLE_UNIVERSAL_BUILD 1
+#define WORDS_BIGENDIAN 1
 _ACEOF
-
-     ;; #(
-   *)
-     { { $as_echo "$as_me:$LINENO: error: unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" >&5
-$as_echo "$as_me: error: unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+ ;;
+  no)
+     ;;
+  *)
+    { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
    { (exit 1); exit 1; }; } ;;
- esac
+esac
 
 
 # Check whether right shifting a negative integer extends the sign bit
 # or fills with zeros (like the Cray J90, according to Tim Peters).
-{ $as_echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
-$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
+{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
+echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
 if test "${ac_cv_rshift_extends_sign+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 if test "$cross_compiling" = yes; then
@@ -24304,40 +23614,37 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_rshift_extends_sign=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_rshift_extends_sign=no
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
-$as_echo "$ac_cv_rshift_extends_sign" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
+echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
 if test "$ac_cv_rshift_extends_sign" = no
 then
 
@@ -24348,10 +23655,10 @@
 fi
 
 # check for getc_unlocked and related locking functions
-{ $as_echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
-$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
+{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
+echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
 if test "${ac_cv_have_getc_unlocked+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 cat >conftest.$ac_ext <<_ACEOF
@@ -24380,36 +23687,32 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_have_getc_unlocked=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_have_getc_unlocked=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
-$as_echo "$ac_cv_have_getc_unlocked" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
 if test "$ac_cv_have_getc_unlocked" = yes
 then
 
@@ -24427,8 +23730,8 @@
 # library.  NOTE: Keep the precedence of listed libraries synchronised
 # with setup.py.
 py_cv_lib_readline=no
-{ $as_echo "$as_me:$LINENO: checking how to link readline libs" >&5
-$as_echo_n "checking how to link readline libs... " >&6; }
+{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
+echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
 for py_libtermcap in "" ncursesw ncurses curses termcap; do
   if test -z "$py_libtermcap"; then
     READLINE_LIBS="-lreadline"
@@ -24464,30 +23767,26 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   py_cv_lib_readline=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
   if test $py_cv_lib_readline = yes; then
@@ -24497,11 +23796,11 @@
 # Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
 #AC_SUBST([READLINE_LIBS])
 if test $py_cv_lib_readline = no; then
-  { $as_echo "$as_me:$LINENO: result: none" >&5
-$as_echo "none" >&6; }
+  { echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6; }
 else
-  { $as_echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
-$as_echo "$READLINE_LIBS" >&6; }
+  { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
+echo "${ECHO_T}$READLINE_LIBS" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_LIBREADLINE 1
@@ -24510,10 +23809,10 @@
 fi
 
 # check for readline 2.1
-{ $as_echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
-$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
+{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
+echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
 if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lreadline $READLINE_LIBS $LIBS"
@@ -24545,37 +23844,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_readline_rl_callback_handler_install=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_readline_rl_callback_handler_install=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
-$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
-if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
+echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
+if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_RL_CALLBACK 1
@@ -24598,21 +23893,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
   have_readline=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   have_readline=no
@@ -24643,10 +23937,10 @@
 fi
 
 # check for readline 4.0
-{ $as_echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
-$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
+{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
+echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
 if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lreadline $READLINE_LIBS $LIBS"
@@ -24678,37 +23972,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_readline_rl_pre_input_hook=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_readline_rl_pre_input_hook=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
-$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
-if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
+echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
+if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_RL_PRE_INPUT_HOOK 1
@@ -24718,10 +24008,10 @@
 
 
 # also in 4.0
-{ $as_echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
-$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
+{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
+echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
 if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lreadline $READLINE_LIBS $LIBS"
@@ -24753,37 +24043,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_readline_rl_completion_display_matches_hook=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_readline_rl_completion_display_matches_hook=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
-$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
-if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
+echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
+if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
@@ -24793,10 +24079,10 @@
 
 
 # check for readline 4.2
-{ $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
-$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
+{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
+echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
 if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lreadline $READLINE_LIBS $LIBS"
@@ -24828,37 +24114,33 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_lib_readline_rl_completion_matches=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_lib_readline_rl_completion_matches=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
-$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
-if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
+echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
+if test $ac_cv_lib_readline_rl_completion_matches = yes; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_RL_COMPLETION_MATCHES 1
@@ -24881,21 +24163,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
   have_readline=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   have_readline=no
@@ -24928,10 +24209,10 @@
 # End of readline checks: restore LIBS
 LIBS=$LIBS_no_readline
 
-{ $as_echo "$as_me:$LINENO: checking for broken nice()" >&5
-$as_echo_n "checking for broken nice()... " >&6; }
+{ echo "$as_me:$LINENO: checking for broken nice()" >&5
+echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
 if test "${ac_cv_broken_nice+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 if test "$cross_compiling" = yes; then
@@ -24959,40 +24240,37 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_broken_nice=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_broken_nice=no
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
-$as_echo "$ac_cv_broken_nice" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
+echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
 if test "$ac_cv_broken_nice" = yes
 then
 
@@ -25002,8 +24280,8 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for broken poll()" >&5
-$as_echo_n "checking for broken poll()... " >&6; }
+{ echo "$as_me:$LINENO: checking for broken poll()" >&5
+echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
 if test "$cross_compiling" = yes; then
   ac_cv_broken_poll=no
 else
@@ -25045,38 +24323,35 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_broken_poll=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_broken_poll=no
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
-$as_echo "$ac_cv_broken_poll" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
+echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
 if test "$ac_cv_broken_poll" = yes
 then
 
@@ -25089,10 +24364,10 @@
 # Before we can test tzset, we need to check if struct tm has a tm_zone
 # (which is not required by ISO C or UNIX spec) and/or if we support
 # tzname[]
-{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
-$as_echo_n "checking for struct tm.tm_zone... " >&6; }
+{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
+echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -25120,21 +24395,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   ac_cv_member_struct_tm_tm_zone=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	cat >conftest.$ac_ext <<_ACEOF
@@ -25163,21 +24437,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
   ac_cv_member_struct_tm_tm_zone=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_member_struct_tm_tm_zone=no
@@ -25188,9 +24461,9 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
-$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
-if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
+echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
+if test $ac_cv_member_struct_tm_tm_zone = yes; then
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_STRUCT_TM_TM_ZONE 1
@@ -25206,10 +24479,10 @@
 _ACEOF
 
 else
-  { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5
-$as_echo_n "checking whether tzname is declared... " >&6; }
+  { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
+echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
 if test "${ac_cv_have_decl_tzname+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -25236,21 +24509,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_have_decl_tzname=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_have_decl_tzname=no
@@ -25258,9 +24530,9 @@
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
-$as_echo "$ac_cv_have_decl_tzname" >&6; }
-if test "x$ac_cv_have_decl_tzname" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
+echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
+if test $ac_cv_have_decl_tzname = yes; then
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_TZNAME 1
@@ -25276,10 +24548,10 @@
 fi
 
 
-  { $as_echo "$as_me:$LINENO: checking for tzname" >&5
-$as_echo_n "checking for tzname... " >&6; }
+  { echo "$as_me:$LINENO: checking for tzname" >&5
+echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
 if test "${ac_cv_var_tzname+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -25306,35 +24578,31 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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 && {
-	 test "$cross_compiling" = yes ||
-	 $as_test_x conftest$ac_exeext
-       }; then
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
   ac_cv_var_tzname=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_var_tzname=no
 fi
 
-rm -rf conftest.dSYM
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
-$as_echo "$ac_cv_var_tzname" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
+echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
   if test $ac_cv_var_tzname = yes; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -25346,10 +24614,10 @@
 
 
 # check tzset(3) exists and works like we expect it to
-{ $as_echo "$as_me:$LINENO: checking for working tzset()" >&5
-$as_echo_n "checking for working tzset()... " >&6; }
+{ echo "$as_me:$LINENO: checking for working tzset()" >&5
+echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
 if test "${ac_cv_working_tzset+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
 if test "$cross_compiling" = yes; then
@@ -25432,40 +24700,37 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_working_tzset=yes
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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_working_tzset=no
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
-$as_echo "$ac_cv_working_tzset" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
+echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
 if test "$ac_cv_working_tzset" = yes
 then
 
@@ -25476,10 +24741,10 @@
 fi
 
 # Look for subsecond timestamps in struct stat
-{ $as_echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
-$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
+{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
+echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
 if test "${ac_cv_stat_tv_nsec+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -25505,21 +24770,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_stat_tv_nsec=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_stat_tv_nsec=no
@@ -25528,8 +24792,8 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
-$as_echo "$ac_cv_stat_tv_nsec" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
+echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
 if test "$ac_cv_stat_tv_nsec" = yes
 then
 
@@ -25540,10 +24804,10 @@
 fi
 
 # Look for BSD style subsecond timestamps in struct stat
-{ $as_echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
-$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
+{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
+echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
 if test "${ac_cv_stat_tv_nsec2+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -25569,21 +24833,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_stat_tv_nsec2=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_stat_tv_nsec2=no
@@ -25592,8 +24855,8 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
-$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
+echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
 if test "$ac_cv_stat_tv_nsec2" = yes
 then
 
@@ -25604,10 +24867,10 @@
 fi
 
 # On HP/UX 11.0, mvwdelch is a block with a return statement
-{ $as_echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
-$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
+{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
+echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
 if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -25633,21 +24896,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_mvwdelch_is_expression=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_mvwdelch_is_expression=no
@@ -25656,8 +24918,8 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
-$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
+echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
 
 if test "$ac_cv_mvwdelch_is_expression" = yes
 then
@@ -25668,10 +24930,10 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
-$as_echo_n "checking whether WINDOW has _flags... " >&6; }
+{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
+echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
 if test "${ac_cv_window_has_flags+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -25697,21 +24959,20 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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_window_has_flags=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_cv_window_has_flags=no
@@ -25720,8 +24981,8 @@
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
-$as_echo "$ac_cv_window_has_flags" >&6; }
+{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
+echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
 
 
 if test "$ac_cv_window_has_flags" = yes
@@ -25733,8 +24994,8 @@
 
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for is_term_resized" >&5
-$as_echo_n "checking for is_term_resized... " >&6; }
+{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
+echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -25756,14 +25017,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -25773,21 +25033,21 @@
 #define HAVE_CURSES_IS_TERM_RESIZED 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-{ $as_echo "$as_me:$LINENO: checking for resize_term" >&5
-$as_echo_n "checking for resize_term... " >&6; }
+{ echo "$as_me:$LINENO: checking for resize_term" >&5
+echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -25809,14 +25069,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -25826,21 +25085,21 @@
 #define HAVE_CURSES_RESIZE_TERM 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-{ $as_echo "$as_me:$LINENO: checking for resizeterm" >&5
-$as_echo_n "checking for resizeterm... " >&6; }
+{ echo "$as_me:$LINENO: checking for resizeterm" >&5
+echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -25862,14 +25121,13 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 	 test -z "$ac_c_werror_flag" ||
 	 test ! -s conftest.err
@@ -25879,63 +25137,61 @@
 #define HAVE_CURSES_RESIZETERM 1
 _ACEOF
 
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-	{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+	{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-{ $as_echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
-$as_echo_n "checking for /dev/ptmx... " >&6; }
+{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
+echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
 
 if test -r /dev/ptmx
 then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_DEV_PTMX 1
 _ACEOF
 
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for /dev/ptc" >&5
-$as_echo_n "checking for /dev/ptc... " >&6; }
+{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
+echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
 
 if test -r /dev/ptc
 then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_DEV_PTC 1
 _ACEOF
 
 else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
 
-{ $as_echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
-$as_echo_n "checking for %zd printf() format support... " >&6; }
+{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
+echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
 if test "$cross_compiling" = yes; then
-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run test program while cross compiling
+echo "$as_me: error: cannot run test program while cross compiling
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }; }
+   { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -25984,92 +25240,46 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_try") 2>&5
   ac_status=$?
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+  { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
 #define PY_FORMAT_SIZE_T "z"
 _ACEOF
 
 else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+  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 )
-{ $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 fi
-rm -rf conftest.dSYM
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 
 
 
-{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5
-$as_echo_n "checking for socklen_t... " >&6; }
+{ echo "$as_me:$LINENO: checking for socklen_t" >&5
+echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
 if test "${ac_cv_type_socklen_t+set}" = set; then
-  $as_echo_n "(cached) " >&6
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_type_socklen_t=no
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-
-int
-main ()
-{
-if (sizeof (socklen_t))
-       return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -26085,11 +25295,14 @@
 #endif
 
 
+typedef socklen_t ac__type_new_;
 int
 main ()
 {
-if (sizeof ((socklen_t)))
-	  return 0;
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
   ;
   return 0;
 }
@@ -26100,39 +25313,30 @@
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
+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
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&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
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_socklen_t=yes
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_cv_type_socklen_t=yes
 else
-  $as_echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
+	ac_cv_type_socklen_t=no
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
-$as_echo "$ac_cv_type_socklen_t" >&6; }
-if test "x$ac_cv_type_socklen_t" = x""yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
+echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
+if test $ac_cv_type_socklen_t = yes; then
   :
 else
 
@@ -26152,15 +25356,15 @@
 
 
 SRCDIRS="Parser Grammar Objects Python Modules Mac"
-{ $as_echo "$as_me:$LINENO: checking for build directories" >&5
-$as_echo_n "checking for build directories... " >&6; }
+{ echo "$as_me:$LINENO: checking for build directories" >&5
+echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
 for dir in $SRCDIRS; do
     if test ! -d $dir; then
         mkdir $dir
     fi
 done
-{ $as_echo "$as_me:$LINENO: result: done" >&5
-$as_echo "done" >&6; }
+{ echo "$as_me:$LINENO: result: done" >&5
+echo "${ECHO_T}done" >&6; }
 
 # generate output files
 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
@@ -26192,12 +25396,11 @@
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      *_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) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
       *) $as_unset $ac_var ;;
       esac ;;
     esac
@@ -26230,12 +25433,12 @@
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
     test "x$cache_file" != "x/dev/null" &&
-      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
     cat confcache >$cache_file
   else
-    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+    { 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
@@ -26251,7 +25454,7 @@
 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"`
+  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"
@@ -26263,14 +25466,12 @@
 
 
 
-
 : ${CONFIG_STATUS=./config.status}
-ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+{ 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.
@@ -26283,7 +25484,7 @@
 SHELL=\${CONFIG_SHELL-$SHELL}
 _ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+cat >>$CONFIG_STATUS <<\_ACEOF
 ## --------------------- ##
 ## M4sh Initialization.  ##
 ## --------------------- ##
@@ -26293,7 +25494,7 @@
 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
+  # 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
@@ -26315,45 +25516,17 @@
 as_cr_digits='0123456789'
 as_cr_alnum=$as_cr_Letters$as_cr_digits
 
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
+  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
 
 # Support unset when possible.
@@ -26369,6 +25542,8 @@
 # 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.
@@ -26391,7 +25566,7 @@
   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
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
   { (exit 1); exit 1; }
 fi
 
@@ -26404,10 +25579,17 @@
 PS4='+ '
 
 # NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
+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
 
 # Required to use basename.
 if expr a : '\(a\)' >/dev/null 2>&1 &&
@@ -26429,7 +25611,7 @@
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
 	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
+echo X/"$0" |
     sed '/^.*\/\([^/][^/]*\)\/*$/{
 	    s//\1/
 	    q
@@ -26480,7 +25662,7 @@
       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
+    { 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
@@ -26508,6 +25690,7 @@
 *)
   ECHO_N='-n';;
 esac
+
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -26520,22 +25703,19 @@
   rm -f conf$$.dir/conf$$.file
 else
   rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
+  mkdir conf$$.dir
 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
+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'
-  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
 else
   as_ln_s='cp -p'
 fi
@@ -26560,10 +25740,10 @@
   as_test_x='
     eval sh -c '\''
       if test -d "$1"; then
-	test -d "$1/.";
+        test -d "$1/.";
       else
 	case $1 in
-	-*)set "./$1";;
+        -*)set "./$1";;
 	esac;
 	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
 	???[sx]*):;;*)false;;esac;fi
@@ -26586,7 +25766,7 @@
 # values after options handling.
 ac_log="
 This file was extended by python $as_me 2.7, which was
-generated by GNU Autoconf 2.63.  Invocation command line was
+generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -26599,39 +25779,29 @@
 
 _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
+cat >>$CONFIG_STATUS <<_ACEOF
 # Files that config.status was made for.
-config_files="`echo $ac_config_files`"
-config_headers="`echo $ac_config_headers`"
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
 
 _ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+cat >>$CONFIG_STATUS <<\_ACEOF
 ac_cs_usage="\
 \`$as_me' instantiates files from templates according to the
 current configuration.
 
-Usage: $0 [OPTION]... [FILE]...
+Usage: $0 [OPTIONS] [FILE]...
 
   -h, --help       print this help, then exit
   -V, --version    print version number and configuration settings, then exit
-  -q, --quiet, --silent
-                   do not print progress messages
+  -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
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+		   instantiate the configuration header FILE
 
 Configuration files:
 $config_files
@@ -26642,24 +25812,24 @@
 Report bugs to <bug-autoconf at gnu.org>."
 
 _ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
 python config.status 2.7
-configured by $0, generated by GNU Autoconf 2.63,
-  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.61,
+  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
-Copyright (C) 2008 Free Software Foundation, Inc.
+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."
 
 ac_pwd='$ac_pwd'
 srcdir='$srcdir'
 INSTALL='$INSTALL'
-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.
+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
@@ -26681,36 +25851,30 @@
   -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 ;;
+    echo "$ac_cs_version"; exit ;;
   --debug | --debu | --deb | --de | --d | -d )
     debug=: ;;
   --file | --fil | --fi | --f )
     $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
     ac_need_defaults=false;;
   --header | --heade | --head | --hea )
     $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
-    { $as_echo "$as_me: error: ambiguous option: $1
+    { echo "$as_me: error: ambiguous option: $1
 Try \`$0 --help' for more information." >&2
    { (exit 1); exit 1; }; };;
   --help | --hel | -h )
-    $as_echo "$ac_cs_usage"; exit ;;
+    echo "$ac_cs_usage"; exit ;;
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil | --si | --s)
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) { $as_echo "$as_me: error: unrecognized option: $1
+  -*) { echo "$as_me: error: unrecognized option: $1
 Try \`$0 --help' for more information." >&2
    { (exit 1); exit 1; }; } ;;
 
@@ -26729,32 +25893,30 @@
 fi
 
 _ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>$CONFIG_STATUS <<_ACEOF
 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'
+  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 "\$@"
+  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
 fi
 
 _ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+cat >>$CONFIG_STATUS <<\_ACEOF
 exec 5>>config.log
 {
   echo
   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
 ## Running $as_me. ##
 _ASBOX
-  $as_echo "$ac_log"
+  echo "$ac_log"
 } >&5
 
 _ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>$CONFIG_STATUS <<_ACEOF
 _ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+cat >>$CONFIG_STATUS <<\_ACEOF
 
 # Handling of arguments.
 for ac_config_target in $ac_config_targets
@@ -26770,8 +25932,8 @@
     "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
     "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
 
-  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+  *) { { 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
@@ -26811,145 +25973,227 @@
   (umask 077 && mkdir "$tmp")
 } ||
 {
-   $as_echo "$as_me: cannot create a temporary directory in ." >&2
+   echo "$me: cannot create a temporary directory in ." >&2
    { (exit 1); exit 1; }
 }
 
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
 
-ac_cr='
-'
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\\r'
-else
-  ac_cs_awk_cr=$ac_cr
-fi
+# 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
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
 _ACEOF
 
 
-{
-  echo "cat >conf$$subs.awk <<_ACEOF" &&
-  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
-  echo "_ACEOF"
-} >conf$$subs.sh ||
-  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
-  . ./conf$$subs.sh ||
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
+  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
+VERSION!$VERSION$ac_delim
+SOVERSION!$SOVERSION$ac_delim
+CONFIG_ARGS!$CONFIG_ARGS$ac_delim
+UNIVERSALSDK!$UNIVERSALSDK$ac_delim
+ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
+PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
+PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
+PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
+PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
+PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
+FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
+FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
+FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
+FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
+FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
+MACHDEP!$MACHDEP$ac_delim
+SGI_ABI!$SGI_ABI$ac_delim
+EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
+EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
+CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
+EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$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
+CXX!$CXX$ac_delim
+MAINCC!$MAINCC$ac_delim
+CPP!$CPP$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+BUILDEXEEXT!$BUILDEXEEXT$ac_delim
+LIBRARY!$LIBRARY$ac_delim
+LDLIBRARY!$LDLIBRARY$ac_delim
+DLLLIBRARY!$DLLLIBRARY$ac_delim
+BLDLIBRARY!$BLDLIBRARY$ac_delim
+LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
+INSTSONAME!$INSTSONAME$ac_delim
+RUNSHARED!$RUNSHARED$ac_delim
+LINKCC!$LINKCC$ac_delim
+GNULD!$GNULD$ac_delim
+RANLIB!$RANLIB$ac_delim
+AR!$AR$ac_delim
+ARFLAGS!$ARFLAGS$ac_delim
+SVNVERSION!$SVNVERSION$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+LN!$LN$ac_delim
+OPT!$OPT$ac_delim
+BASECFLAGS!$BASECFLAGS$ac_delim
+UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
+OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
+LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
+SO!$SO$ac_delim
+LDSHARED!$LDSHARED$ac_delim
+BLDSHARED!$BLDSHARED$ac_delim
+CCSHARED!$CCSHARED$ac_delim
+_ACEOF
 
-  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
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
     break
   elif $ac_last_try; then
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+    { { 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
-rm -f conf$$subs.sh
 
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\).*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\).*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
-  N
-  s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
-  for (key in S) S_is_set[key] = 1
-  FS = ""
+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
 
-}
-{
-  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
-  }
+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
 
-  print line
-}
 
-_ACAWK
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+LINKFORSHARED!$LINKFORSHARED$ac_delim
+CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
+SHLIBS!$SHLIBS$ac_delim
+USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
+SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
+USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
+LDLAST!$LDLAST$ac_delim
+THREADOBJ!$THREADOBJ$ac_delim
+DLINCLDIR!$DLINCLDIR$ac_delim
+DYNLOADFILE!$DYNLOADFILE$ac_delim
+MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
+TRUE!$TRUE$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
+HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
+HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
+HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
+HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
+LIBM!$LIBM$ac_delim
+LIBC!$LIBC$ac_delim
+UNICODE_OBJS!$UNICODE_OBJS$ac_delim
+THREADHEADERS!$THREADHEADERS$ac_delim
+SRCDIRS!$SRCDIRS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
-  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
-  cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
-$as_echo "$as_me: error: could not setup config files machinery" >&2;}
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; 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
+
+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
+
+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
 
+
 # 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
@@ -26965,133 +26209,19 @@
 }'
 fi
 
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+cat >>$CONFIG_STATUS <<\_ACEOF
 fi # test -n "$CONFIG_FILES"
 
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
-    break
-  elif $ac_last_try; then
-    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
-$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
-   { (exit 1); exit 1; }; }
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any.  Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' <confdefs.h | sed '
-s/'"$ac_delim"'/"\\\
-"/g' >>$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  for (key in D) D_is_set[key] = 1
-  FS = ""
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
-  line = \$ 0
-  split(line, arg, " ")
-  if (arg[1] == "#") {
-    defundef = arg[2]
-    mac1 = arg[3]
-  } else {
-    defundef = substr(arg[1], 2)
-    mac1 = arg[2]
-  }
-  split(mac1, mac2, "(") #)
-  macro = mac2[1]
-  prefix = substr(line, 1, index(line, defundef) - 1)
-  if (D_is_set[macro]) {
-    # Preserve the white space surrounding the "#".
-    print prefix "define", macro P[macro] D[macro]
-    next
-  } else {
-    # Replace #undef with comments.  This is necessary, for example,
-    # in the case of _POSIX_SOURCE, which is predefined and required
-    # on some systems where configure will not decide to define it.
-    if (defundef == "undef") {
-      print "/*", prefix defundef, macro, "*/"
-      next
-    }
-  }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
-$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
-   { (exit 1); exit 1; }; }
-fi # test -n "$CONFIG_HEADERS"
-
 
-eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
-shift
-for ac_tag
+for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS
 do
   case $ac_tag in
   :[FHLC]) ac_mode=$ac_tag; continue;;
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
-$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
+  :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;;
@@ -27120,38 +26250,26 @@
 	   [\\/$]*) false;;
 	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
 	   esac ||
-	   { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+	   { { 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
-      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      ac_file_inputs="$ac_file_inputs '$ac_f'"
+      ac_file_inputs="$ac_file_inputs $ac_f"
     done
 
     # Let's still pretend it is `configure' which instantiates (i.e., don't
     # use $as_me), people would be surprised to read:
     #    /* config.h.  Generated by config.status.  */
-    configure_input='Generated from '`
-	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
-	`' by configure.'
+    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"
-      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
+      { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
     fi
-    # Neutralize special characters interpreted by sed in replacement strings.
-    case $configure_input in #(
-    *\&* | *\|* | *\\* )
-       ac_sed_conf_input=`$as_echo "$configure_input" |
-       sed 's/[\\\\&|]/\\\\&/g'`;; #(
-    *) ac_sed_conf_input=$configure_input;;
-    esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; } ;;
+    *:-:* | *:-) cat >"$tmp/stdin";;
     esac
     ;;
   esac
@@ -27161,7 +26279,7 @@
 	 X"$ac_file" : 'X\(//\)[^/]' \| \
 	 X"$ac_file" : 'X\(//\)$' \| \
 	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
+echo X"$ac_file" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -27187,7 +26305,7 @@
     as_dirs=
     while :; do
       case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
       *) as_qdir=$as_dir;;
       esac
       as_dirs="'$as_qdir' $as_dirs"
@@ -27196,7 +26314,7 @@
 	 X"$as_dir" : 'X\(//\)[^/]' \| \
 	 X"$as_dir" : 'X\(//\)$' \| \
 	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
+echo X"$as_dir" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -27217,17 +26335,17 @@
       test -d "$as_dir" && break
     done
     test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+  } || 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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  ac_dir_suffix=/`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|/||'`
+  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/ ;;
@@ -27267,13 +26385,12 @@
   esac
 _ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+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=
 
-ac_sed_dataroot='
-/datarootdir/ {
+case `sed -n '/datarootdir/ {
   p
   q
 }
@@ -27282,14 +26399,13 @@
 /@infodir@/p
 /@localedir@/p
 /@mandir@/p
-'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+' $ac_file_inputs` in
 *datarootdir*) ac_datarootdir_seen=yes;;
 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+  { 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_write_fail=1
+cat >>$CONFIG_STATUS <<_ACEOF
   ac_datarootdir_hack='
   s&@datadir@&$datadir&g
   s&@docdir@&$docdir&g
@@ -27303,16 +26419,15 @@
 # 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
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
 $extrasub
 _ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+cat >>$CONFIG_STATUS <<\_ACEOF
 :t
 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
+s&@configure_input@&$configure_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
@@ -27322,58 +26437,119 @@
 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
 s&@INSTALL@&$ac_INSTALL&;t t
 $ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
   { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined." >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
 which seems to be undefined.  Please make sure it is defined." >&2;}
 
   rm -f "$tmp/stdin"
   case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
-  esac \
-  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
+  -) cat "$tmp/out"; rm -f "$tmp/out";;
+  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+  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
+
+echo "ac_result=$ac_in" >>$CONFIG_STATUS
+cat >>$CONFIG_STATUS <<\_ACEOF
   if test x"$ac_file" != x-; then
-    {
-      $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
+    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" \
-	|| { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
-$as_echo "$as_me: error: could not create $ac_file" >&2;}
-   { (exit 1); exit 1; }; }
+      rm -f $ac_file
+      mv "$tmp/config.h" $ac_file
     fi
   else
-    $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
-$as_echo "$as_me: error: could not create -" >&2;}
-   { (exit 1); exit 1; }; }
+    echo "/* $configure_input  */"
+    cat "$ac_result"
   fi
+  rm -f "$tmp/out12"
  ;;
 
 
@@ -27387,11 +26563,6 @@
 chmod +x $CONFIG_STATUS
 ac_clean_files=$ac_clean_files_save
 
-test $ac_write_fail = 0 ||
-  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
-
 
 # configure is writing to config.log, and then calls config.status.
 # config.status does its own redirection, appending to config.log.
@@ -27413,10 +26584,6 @@
   # would make configure fail if this is the last instruction.
   $ac_cs_success || { (exit 1); exit 1; }
 fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
 
 
 echo "creating Modules/Setup"
@@ -27438,12 +26605,12 @@
 
 case $ac_sys_system in
 BeOS)
-        { $as_echo "$as_me:$LINENO: WARNING:
+        { echo "$as_me:$LINENO: WARNING:
 
   Support for BeOS is deprecated as of Python 2.6.
   See PEP 11 for the gory details.
   " >&5
-$as_echo "$as_me: WARNING:
+echo "$as_me: WARNING:
 
   Support for BeOS is deprecated as of Python 2.6.
   See PEP 11 for the gory details.

Modified: python/branches/tk_and_idle_maintenance/configure.in
==============================================================================
--- python/branches/tk_and_idle_maintenance/configure.in	(original)
+++ python/branches/tk_and_idle_maintenance/configure.in	Sat Jun 20 00:11:15 2009
@@ -1592,6 +1592,10 @@
          [Define if you want to produce an OpenStep/Rhapsody framework
          (shared library plus accessory files).])
 	AC_MSG_RESULT(yes)
+	if test $enable_shared = "yes"
+	then
+		AC_MSG_ERROR([Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead])
+	fi
 else
 	AC_MSG_RESULT(no)
 fi

Modified: python/branches/tk_and_idle_maintenance/setup.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/setup.py	(original)
+++ python/branches/tk_and_idle_maintenance/setup.py	Sat Jun 20 00:11:15 2009
@@ -438,10 +438,11 @@
         exts.append( Extension("_heapq", ["_heapqmodule.c"]) )
         # operator.add() and similar goodies
         exts.append( Extension('operator', ['operator.c']) )
-        # Python 3.0 _fileio module
-        exts.append( Extension("_fileio", ["_fileio.c"]) )
-        # Python 3.0 _bytesio module
-        exts.append( Extension("_bytesio", ["_bytesio.c"]) )
+        # Python 3.1 _io library
+        exts.append( Extension("_io",
+            ["_io/bufferedio.c", "_io/bytesio.c", "_io/fileio.c",
+             "_io/iobase.c", "_io/_iomodule.c", "_io/stringio.c", "_io/textio.c"],
+             depends=["_io/_iomodule.h"], include_dirs=["Modules/_io"]))
         # _functools
         exts.append( Extension("_functools", ["_functoolsmodule.c"]) )
         # _json speedups


More information about the Python-checkins mailing list