[Python-checkins] python/dist/src LICENSE, 1.22.2.2, 1.22.2.3 Makefile.pre.in, 1.86.2.6, 1.86.2.7 README, 1.148.2.2, 1.148.2.3 configure, 1.317.2.2, 1.317.2.3 configure.in, 1.327.2.2, 1.327.2.3 pyconfig.h.in, 1.42.2.2, 1.42.2.3 setup.py, 1.98.2.2, 1.98.2.3

jhylton@users.sourceforge.net jhylton at users.sourceforge.net
Sun Oct 16 07:24:32 CEST 2005


Update of /cvsroot/python/python/dist/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27718

Modified Files:
      Tag: ast-branch
	LICENSE Makefile.pre.in README configure configure.in 
	pyconfig.h.in setup.py 
Log Message:
Merge head to branch (for the last time)


Index: LICENSE
===================================================================
RCS file: /cvsroot/python/python/dist/src/LICENSE,v
retrieving revision 1.22.2.2
retrieving revision 1.22.2.3
diff -u -d -r1.22.2.2 -r1.22.2.3
--- LICENSE	7 Jan 2005 06:56:20 -0000	1.22.2.2
+++ LICENSE	16 Oct 2005 05:23:54 -0000	1.22.2.3
@@ -47,7 +47,9 @@
     2.3.2           2.3.1       2002-2003   PSF         yes
     2.3.3           2.3.2       2002-2003   PSF         yes
     2.3.4           2.3.3       2004        PSF         yes
+    2.3.5           2.3.4       2005        PSF         yes
     2.4             2.3         2004        PSF         yes
+    2.4.1           2.4         2005        PSF         yes
 
 Footnotes:
 
@@ -83,9 +85,9 @@
 prepare derivative works, distribute, and otherwise use Python
 alone or in any derivative version, provided, however, that PSF's
 License Agreement and PSF's notice of copyright, i.e., "Copyright (c)
-2001, 2002, 2003, 2004 Python Software Foundation; All Rights Reserved"
-are retained in Python alone or in any derivative version prepared
-by Licensee.
+2001, 2002, 2003, 2004, 2005 Python Software Foundation; All Rights 
+Reserved" are retained in Python alone or in any derivative version 
+prepared by Licensee.
 
 3. In the event Licensee prepares a derivative work that is based on
 or incorporates Python or any part thereof, and wants to make

Index: Makefile.pre.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/Makefile.pre.in,v
retrieving revision 1.86.2.6
retrieving revision 1.86.2.7
diff -u -d -r1.86.2.6 -r1.86.2.7
--- Makefile.pre.in	20 Mar 2005 23:26:45 -0000	1.86.2.6
+++ Makefile.pre.in	16 Oct 2005 05:23:54 -0000	1.86.2.7
@@ -55,7 +55,7 @@
 # Compiler options
 OPT=		@OPT@
 BASECFLAGS=	@BASECFLAGS@
-CFLAGS=		$(BASECFLAGS) $(OPT)
+CFLAGS=		$(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS)
 # Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
 # be able to build extension modules using the directories specified in the
 # environment variables
@@ -113,8 +113,8 @@
 # Deployment target selected during configure, to be checked
 # by distutils
 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
-# Options to enable prebinding (for fast startup)
-OTHER_LIBTOOL_OPT = -prebind -seg1addr 0x10000000
+# Options to enable prebinding (for fast startup prior to Mac OS X 10.3)
+OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@
 
 # Environment to run shared python without installed libraries
 RUNSHARED=       @RUNSHARED@
@@ -387,7 +387,7 @@
                 $(RESSRCDIR)/English.lproj/InfoPlist.strings
 	$(INSTALL) -d -m $(DIRMODE) $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)
 	libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) \
-		-framework System @LIBTOOL_CRUFT@
+		@LIBTOOL_CRUFT@
 	$(INSTALL) -d -m $(DIRMODE)  \
 		$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj
 	$(INSTALL_DATA) $(RESSRCDIR)/Info.plist \
@@ -682,7 +682,8 @@
 		test/decimaltestdata \
 		encodings email email/test email/test/data compiler hotshot \
 		logging bsddb bsddb/test csv idlelib idlelib/Icons \
-		distutils distutils/command $(XMLLIBSUBDIRS) curses $(MACHDEPS)
+		distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
+		curses $(MACHDEPS)
 libinstall:	$(BUILDPYTHON) $(srcdir)/Lib/$(PLATDIR)
 	@for i in $(SCRIPTDIR) $(LIBDEST); \
 	do \
@@ -741,11 +742,11 @@
 	PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
 		./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
 		-d $(LIBDEST) -f \
-		-x 'badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
+		-x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
 	PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
 		./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
 		-d $(LIBDEST) -f \
-		-x 'badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
+		-x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
 	-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
 		./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
 		-d $(LIBDEST)/site-packages -f \

Index: README
===================================================================
RCS file: /cvsroot/python/python/dist/src/README,v
retrieving revision 1.148.2.2
retrieving revision 1.148.2.3
diff -u -d -r1.148.2.2 -r1.148.2.3
--- README	7 Jan 2005 06:56:36 -0000	1.148.2.2
+++ README	16 Oct 2005 05:23:54 -0000	1.148.2.3
@@ -1,7 +1,7 @@
-This is Python version 2.4 alpha 3
+This is Python version 2.5 alpha 0
 ==================================
 
-Copyright (c) 2001, 2002, 2003, 2004 Python Software Foundation.
+Copyright (c) 2001, 2002, 2003, 2004, 2005 Python Software Foundation.
 All rights reserved.
 
 Copyright (c) 2000 BeOpen.com.
@@ -35,6 +35,7 @@
 
 See the file "Misc/NEWS".
 
+
 If you don't read instructions
 ------------------------------
 
@@ -45,30 +46,29 @@
 executable "./python"; to install in /usr/local, first do "su root"
 and then "make install".
 
-The section `Build instructions' below is still recommended reading,
-especially the part on customizing Modules/Setup.
+The section `Build instructions' below is still recommended reading.
 
 
 What is Python anyway?
 ----------------------
 
-Python is an interpreted object-oriented programming language suitable
-(amongst other uses) for distributed application development,
-scripting, numeric computing and system testing.  Python is often
-compared to Tcl, Perl, Java, JavaScript, Visual Basic or Scheme.  To
-find out more about what Python can do for you, point your browser to
-http://www.python.org/.
+Python is an interpreted, interactive object-oriented programming
+language suitable (amongst other uses) for distributed application
+development, scripting, numeric computing and system testing.  Python
+is often compared to Tcl, Perl, Java, JavaScript, Visual Basic or
+Scheme.  To find out more about what Python can do for you, point your
+browser to http://www.python.org/.
 
 
 How do I learn Python?
 ----------------------
 
 The official tutorial is still a good place to start; see
-http://www.python.org/doc/ for online and downloadable versions, as
-well as a list of other introductions, and reference documentation.
+http://docs.python.org/ for online and downloadable versions, as well
+as a list of other introductions, and reference documentation.
 
 There's a quickly growing set of books on Python.  See
-http://www.python.org/cgi-bin/moinmoin/PythonBooks for a list.
+http://wiki.python.org/moin/PythonBooks for a list.
 
 
 Documentation
@@ -82,16 +82,17 @@
 and functions!
 
 All documentation is also available online at the Python web site
-(http://www.python.org/doc/, see below).  It is available online for
+(http://docs.python.org/, see below).  It is available online for
 occasional reference, or can be downloaded in many formats for faster
 access.  The documentation is available in HTML, PostScript, PDF, and
 LaTeX formats; the LaTeX version is primarily for documentation
 authors, translators, and people with special formatting requirements.
 
-The best documentation for the new (in Python 2.2) type/class
-unification features is Guido's tutorial introduction, at
+Unfortunately, new-style classes (new in Python 2.2) have not yet been
+integrated into Python's standard documention.  A collection of
+pointers to what has been written is at:
 
-    http://www.python.org/2.2.1/descrintro.html
+    http://www.python.org/doc/newstyle.html
 
 
 Web sites
@@ -110,12 +111,12 @@
 Read comp.lang.python, a high-volume discussion newsgroup about
 Python, or comp.lang.python.announce, a low-volume moderated newsgroup
 for Python-related announcements.  These are also accessible as
-mailing lists: see http://www.python.org/psa/MailingLists.html for an
-overview of the many Python-related mailing lists.
+mailing lists: see http://www.python.org/community/lists.html for an
+overview of these and many other Python-related mailing lists.
 
 Archives are accessible via the Google Groups usenet archive; see
 http://groups.google.com/.  The mailing lists are also archived, see
-http://www.python.org/psa/MailingLists.html for details.
+http://www.python.org/community/lists.html for details.
 
 
 Bug reports
@@ -135,7 +136,7 @@
 If you have a proposal to change Python, it's best to submit a Python
 Enhancement Proposal (PEP) first.  All current PEPs, as well as
 guidelines for submitting a new PEP, are listed at
-http://python.sourceforge.net/peps/.
+http://www.python.org/peps/.
 
 
 Questions
@@ -189,10 +190,9 @@
 
 See also the platform specific notes in the next section.
 
-If you run into other trouble, see section 3 of the FAQ
-(http://www.python.org/cgi-bin/faqw.py or
-http://www.python.org/doc/FAQ.html) for hints on what can go wrong,
-and how to fix it.
+If you run into other trouble, see the FAQ
+(http://www.python.org/doc/faq) for hints on what can go wrong, and
+how to fix it.
 
 If you rerun the configure script with different options, remove all
 object files by running "make clean" before rebuilding.  Believe it or
@@ -200,8 +200,7 @@
 problems as well.  Try it before sending in a bug report!
 
 If the configure script fails or doesn't seem to find things that
-should be there, inspect the config.log file.  When you fix a
-configure problem, be sure to remove config.cache!
+should be there, inspect the config.log file.
 
 If you get a warning for every file about the -Olimit option being no
 longer supported, you can ignore it.  There's no foolproof way to know
@@ -227,8 +226,10 @@
 Unsupported systems
 -------------------
 
+XXX This section is out of date!
+
 A number of features are not supported in Python 2.3 anymore. Some
-support code is still present, but will be removed in Python 2.4.
+support code is still present, but will be removed in Python 2.4. 
 If you still need to use current Python versions on these systems,
 please send a message to python-dev at python.org indicating that you
 volunteer to support this system.
@@ -263,12 +264,9 @@
 	    bsddb185 bsddbmodule.c
 
 	should work.  (You may need to add -I, -L or -l flags to direct the
-	compiler and linker to your include files and libraries.)  You can
-	then force it to be the version people import by adding
-
-	    import bsddb185 as bsddb
+	compiler and linker to your include files and libraries.)
 
-	in sitecustomize.py.
+XXX I think this next bit is out of date:
 
 64-bit platforms: The modules audioop, imageop and rgbimg don't work.
 	The setup.py script disables them on 64-bit installations.
@@ -295,8 +293,8 @@
 	When the dynamic loader complains about errors finding shared
 	libraries, such as
 
-	ld.so.1: ./python: fatal: libstdc++.so.5: open failed: 
-	No such file or directory 
+	ld.so.1: ./python: fatal: libstdc++.so.5: open failed:
+	No such file or directory
 
 	you need to first make sure that the library is available on
 	your system. Then, you need to instruct the dynamic loader how
@@ -314,13 +312,9 @@
 	solves the problem.  This causes the popen2 test to fail;
 	problem and solution reported by Pablo Bleyer.
 
-	Under Linux systems using GNU libc 2 (aka libc6), the crypt
-	module now needs the -lcrypt option.  The setup.py script
-	takes care of this automatically.
-
 Red Hat Linux: Red Hat 9 built Python2.2 in UCS-4 mode and hacked
 	Tcl to support it. To compile Python2.3 with Tkinter, you will
-	need to pass --enable-unicode=ucs4 flag to ./configure. 
+	need to pass --enable-unicode=ucs4 flag to ./configure.
 
 	There's an executable /usr/bin/python which is Python
 	1.5.2 on most older Red Hat installations; several key Red Hat tools
@@ -363,19 +357,44 @@
 	like "cc_r".  For full C++ module support, set CC="xlC_r" (or
 	CC="xlC" without thread support).
 
+AIX 5.3: To build a 64-bit version with IBM's compiler, I used the
+        following:
+
+        export PATH=/usr/bin:/usr/vacpp/bin
+	./configure --with-gcc="xlc_r -q64" --with-cxx="xlC_r -q64" \
+                    --disable-ipv6 AR="ar -X64"
+	make
+
 HP-UX:  When using threading, you may have to add -D_REENTRANT to the
 	OPT variable in the top-level Makefile; reported by Pat Knight,
 	this seems to make a difference (at least for HP-UX 10.20)
 	even though pyconfig.h defines it. This seems unnecessary when
-	using HP/UX 11 and later - threading seems to work "out of the 
+	using HP/UX 11 and later - threading seems to work "out of the
 	box".
 
-HP-UX ia64: When building on the ia64 (Itanium) platform using HP's 
-	compiler, some experience has shown that the compiler's 
-	optimiser produces a completely broken version of python 
-	(see http://www.python.org/sf/814976). To work around this, 
+HP-UX ia64: When building on the ia64 (Itanium) platform using HP's
+	compiler, some experience has shown that the compiler's
+	optimiser produces a completely broken version of python
+	(see http://www.python.org/sf/814976). To work around this,
 	edit the Makefile and remove -O from the OPT line.
 
+	To build a 64-bit executable on an Itanium 2 system using HP's
+	compiler, use these environment variables:
+
+		CC=cc
+		CXX=aCC
+		BASECFLAGS="+DD64"
+		LDFLAGS="+DD64 -lxnet"
+
+	and call configure as:
+
+		./configure --without-gcc
+
+	then *unset* the environment variables again before running
+	make.  (At least one of these flags causes the build to fail
+	if it remains set.)  You still have to edit the Makefile and
+	remove -O from the OPT line.
+
 HP PA-RISC 2.0: A recent bug report (http://www.python.org/sf/546117)
 	suggests that the C compiler in this 64-bit system has bugs
 	in the optimizer that break Python.  Compiling without
@@ -541,7 +560,7 @@
         do "sudo make install" which installs everything as superuser,
         as this may later cause problems when installing distutils-based
         additions.
-        
+
         Some people have reported problems building Python after using "fink"
         to install additional unix software. Disabling fink (remove all references
         to /sw from your .profile or .login) should solve this.
@@ -552,7 +571,7 @@
         /Library/Frameworks). A framework install is probably needed if you
         want to use any Aqua-based GUI toolkit (whether Tkinter, wxPython,
         Carbon, Cocoa or anything else).
-        
+
         See Mac/OSX/README for more information on framework builds.
 
 Cygwin: With recent (relative to the time of writing, 2001-12-19)
@@ -767,9 +786,9 @@
 ---------------------------
 
 Starting with Python 2.3, the majority of the interpreter can be built
-into a shared library, which can then be used by the interpreter 
+into a shared library, which can then be used by the interpreter
 executable, and by applications embedding Python. To enable this feature,
-configure with --enable-shared. 
+configure with --enable-shared.
 
 If you enable this feature, the same object files will be used to create
 a static library.  In particular, the static library will contain object
@@ -833,6 +852,9 @@
 Additional debugging code to help debug memory management problems can
 be enabled by using the --with-pydebug option to the configure script.
 
+For flags that change binary compatibility, use the EXTRA_CFLAGS
+variable.
+
 
 Profiling
 ---------
@@ -1018,7 +1040,7 @@
 --with-pydebug:  Enable additional debugging code to help track down
 	memory management problems.  This allows printing a list of all
 	live objects when the interpreter terminates.
-	
+
 --with(out)-universal-newlines: enable reading of text files with
 	foreign newline convention (default: enabled). In other words,
 	any of \r, \n or \r\n is acceptable as end-of-line character.
@@ -1028,6 +1050,7 @@
 
 --with-tsc: Profile using the Pentium timestamping counter (TSC).
 
+
 Building for multiple architectures (using the VPATH feature)
 -------------------------------------------------------------
 
@@ -1130,9 +1153,7 @@
 For more Tkinter information, see the Tkinter Resource page:
 http://www.python.org/topics/tkinter/
 
-There are demos in the Demo/tkinter directory, in the subdirectories
-guido, matt and www (the matt and guido subdirectories have been
-overhauled to use more recent Tkinter coding conventions).
+There are demos in the Demo/tkinter directory.
 
 Note that there's a Python module called "Tkinter" (capital T) which
 lives in Lib/lib-tk/Tkinter.py, and a C module called "_tkinter"

Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.317.2.2
retrieving revision 1.317.2.3
diff -u -d -r1.317.2.2 -r1.317.2.3
--- configure	7 Jan 2005 06:56:36 -0000	1.317.2.2
+++ configure	16 Oct 2005 05:23:54 -0000	1.317.2.3
@@ -1,8 +1,10 @@
 #! /bin/sh
-# From configure.in Revision: 1.477 .
+# From configure.in Revision: 1.486 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59 for python 2.5.
 #
+# Report bugs to <http://www.python.org/python-bugs>.
+#
 # Copyright (C) 2003 Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
@@ -270,7 +272,7 @@
 PACKAGE_TARNAME='python'
 PACKAGE_VERSION='2.5'
 PACKAGE_STRING='python 2.5'
-PACKAGE_BUGREPORT=''
+PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
 
 ac_unique_file="Include/object.h"
 # Factoring default headers for most tests.
@@ -310,7 +312,7 @@
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION SOVERSION CONFIG_ARGS PYTHONFRAMEWORK PYTHONFRAMEWORKDIR PYTHONFRAMEWORKPREFIX PYTHONFRAMEWORKINSTALLDIR MACHDEP SGI_ABI EXTRAPLATDIR EXTRAMACHDEPPATH CONFIGURE_MACOSX_DEPLOYMENT_TARGET CXX MAINOBJ EXEEXT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP EGREP BUILDEXEEXT LIBRARY LDLIBRARY DLLLIBRARY BLDLIBRARY LDLIBRARYDIR INSTSONAME RUNSHARED LINKCC RANLIB ac_ct_RANLIB AR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN OPT BASECFLAGS 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_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION SOVERSION CONFIG_ARGS PYTHONFRAMEWORK PYTHONFRAMEWORKDIR PYTHONFRAMEWORKPREFIX PYTHONFRAMEWORKINSTALLDIR MACHDEP SGI_ABI EXTRAPLATDIR EXTRAMACHDEPPATH CONFIGURE_MACOSX_DEPLOYMENT_TARGET CXX MAINOBJ EXEEXT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP EGREP BUILDEXEEXT LIBRARY LDLIBRARY DLLLIBRARY BLDLIBRARY LDLIBRARYDIR INSTSONAME RUNSHARED LINKCC RANLIB ac_ct_RANLIB AR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN OPT BASECFLAGS 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=''
 
 # Initialize some variables set by options.
@@ -888,6 +890,7 @@
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
+Report bugs to <http://www.python.org/python-bugs>.
 _ACEOF
 fi
 
@@ -1508,6 +1511,12 @@
       define_xopen_source=no
     fi
     ;;
+  # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
+  # disables platform specific features beyond repair.
+  Darwin/8.*)
+    define_xopen_source=no
+    ;;
+
 esac
 
 if test $define_xopen_source = yes
@@ -1542,6 +1551,7 @@
 _ACEOF
 
 
+
 cat >>confdefs.h <<\_ACEOF
 #define _POSIX_C_SOURCE 200112L
 _ACEOF
@@ -3255,9 +3265,11 @@
         if test -z "$CXX"; then
               LINKCC="\$(PURIFY) \$(CC)"
         else
-              echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
-              $CXX -c conftest.$ac_ext 2>&5
-              if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
+              echo 'extern "C" void foo();int main(){foo();}' > conftest_a.cc
+              $CXX -c conftest_a.cc # 2>&5
+              echo 'void foo(){}' > conftest_b.$ac_ext
+              $CC -c conftest_b.$ac_ext # 2>&5
+              if $CC -o conftest$ac_exeext conftest_a.$ac_objext conftest_b.$ac_objext 2>&5 \
                  && test -s conftest$ac_exeext && ./conftest$ac_exeext
               then
                  LINKCC="\$(PURIFY) \$(CC)"
@@ -4538,7 +4550,8 @@
 
 
 
-for ac_header in curses.h dlfcn.h fcntl.h grp.h langinfo.h \
+
+for ac_header in curses.h dlfcn.h fcntl.h grp.h shadow.h langinfo.h \
 libintl.h ncurses.h poll.h pthread.h \
 stropts.h termios.h thread.h \
 unistd.h utime.h \
@@ -4668,9 +4681,9 @@
 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
     (
       cat <<\_ASBOX
-## --------------------------------- ##
-## Report this to the python lists.  ##
-## --------------------------------- ##
+## ------------------------------------------------ ##
+## Report this to http://www.python.org/python-bugs ##
+## ------------------------------------------------ ##
 _ASBOX
     ) |
       sed "s/^/$as_me: WARNING:     /" >&2
@@ -5201,9 +5214,9 @@
 echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
     (
       cat <<\_ASBOX
-## --------------------------------- ##
-## Report this to the python lists.  ##
-## --------------------------------- ##
+## ------------------------------------------------ ##
+## Report this to http://www.python.org/python-bugs ##
+## ------------------------------------------------ ##
 _ASBOX
     ) |
       sed "s/^/$as_me: WARNING:     /" >&2
@@ -5349,9 +5362,9 @@
 echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
     (
       cat <<\_ASBOX
-## --------------------------------- ##
-## Report this to the python lists.  ##
-## --------------------------------- ##
+## ------------------------------------------------ ##
+## Report this to http://www.python.org/python-bugs ##
+## ------------------------------------------------ ##
 _ASBOX
     ) |
       sed "s/^/$as_me: WARNING:     /" >&2
@@ -10193,13 +10206,29 @@
 
 
 case $ac_sys_system/$ac_sys_release in
-  Darwin/1.3*)
-    LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
+  Darwin/[01234567].*)
+    OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
+    ;;
+  Darwin/*)
+    OTHER_LIBTOOL_OPT=""
+    ;;
+esac
+
+
+case $ac_sys_system/$ac_sys_release in
+  Darwin/[01234567].*)
+    LIBTOOL_CRUFT="-framework System -lcc_dynamic -arch_only ppc"
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
   Darwin/*)
-    LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
-      LIBTOOL_CRUFT="$LIBTOOL_CRUFT"
+    gcc_version=`gcc -v 2>&1 |  grep version | cut -d\  -f3`
+    if test ${gcc_version} '<' 4.0
+        then
+            LIBTOOL_CRUFT="-lcc_dynamic"
+        else
+            LIBTOOL_CRUFT=""
+    fi
+    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -lSystem -lSystemStubs -arch_only ppc'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
 esac
@@ -10302,8 +10331,8 @@
 		LDSHARED='$(CC) $(LDFLAGS) -bundle'
 		if test "$enable_framework" ; then
 			# Link against the framework. All externals should be defined.
-			BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
-			LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
+			BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
+			LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
 		else
 			# No framework. Ignore undefined symbols, assuming they come from Python
 			LDSHARED="$LDSHARED -undefined suppress"
@@ -10312,8 +10341,8 @@
 		LDSHARED='$(CC) $(LDFLAGS) -bundle'
 		if test "$enable_framework" ; then
 			# Link against the framework. All externals should be defined.
-			BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
-			LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
+			BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
+			LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
 		else
 			# No framework, use the Python app as bundle-loader
 			BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
@@ -10323,17 +10352,17 @@
 		# Use -undefined dynamic_lookup whenever possible (10.3 and later).
 		# This allows an extension to be used in any Python
 		cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
+		CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
 		if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
 		then
 			LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
 			BLDSHARED="$LDSHARED"
-			CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
 		else
 			LDSHARED='$(CC) $(LDFLAGS) -bundle'
 			if test "$enable_framework" ; then
 				# Link against the framework. All externals should be defined.
-				BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
-				LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
+				BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
+				LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
 			else
 				# No framework, use the Python app as bundle-loader
 				BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
@@ -10429,7 +10458,7 @@
 		LINKFORSHARED="$extra_undefs"
 		if test "$enable_framework"
 		then
-			LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework "'$(PYTHONFRAMEWORK)'
+			LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
 		fi
 		LINKFORSHARED="$LINKFORSHARED";;
 	OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
@@ -11430,9 +11459,9 @@
 echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
     (
       cat <<\_ASBOX
-## --------------------------------- ##
-## Report this to the python lists.  ##
-## --------------------------------- ##
+## ------------------------------------------------ ##
+## Report this to http://www.python.org/python-bugs ##
+## ------------------------------------------------ ##
 _ASBOX
     ) |
       sed "s/^/$as_me: WARNING:     /" >&2
@@ -11585,9 +11614,9 @@
 echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
     (
       cat <<\_ASBOX
-## --------------------------------- ##
-## Report this to the python lists.  ##
-## --------------------------------- ##
+## ------------------------------------------------ ##
+## Report this to http://www.python.org/python-bugs ##
+## ------------------------------------------------ ##
 _ASBOX
     ) |
       sed "s/^/$as_me: WARNING:     /" >&2
@@ -11917,9 +11946,9 @@
 echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
     (
       cat <<\_ASBOX
-## --------------------------------- ##
-## Report this to the python lists.  ##
-## --------------------------------- ##
+## ------------------------------------------------ ##
+## Report this to http://www.python.org/python-bugs ##
+## ------------------------------------------------ ##
 _ASBOX
     ) |
       sed "s/^/$as_me: WARNING:     /" >&2
@@ -12067,9 +12096,9 @@
 echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
     (
       cat <<\_ASBOX
-## --------------------------------- ##
-## Report this to the python lists.  ##
-## --------------------------------- ##
+## ------------------------------------------------ ##
+## Report this to http://www.python.org/python-bugs ##
+## ------------------------------------------------ ##
 _ASBOX
     ) |
       sed "s/^/$as_me: WARNING:     /" >&2
@@ -13429,10 +13458,12 @@
 
 
 
+
+
 for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
  execv fork fpathconf ftime ftruncate \
  gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
- getpriority getpwent getsid getwd \
+ getpriority getpwent getspnam getspent getsid getwd \
  kill killpg lchown lstat mkfifo mknod mktime \
  mremap nice pathconf pause plock poll pthread_init \
  putenv readlink realpath \
@@ -16385,6 +16416,336 @@
 
 fi
 
+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
+  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
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_flags)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_stat_st_flags=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_flags)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_stat_st_flags=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_stat_st_flags=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+_ACEOF
+
+
+fi
+
+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
+  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
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_gen)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_stat_st_gen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_gen)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_stat_st_gen=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_stat_st_gen=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+_ACEOF
+
+
+fi
+
+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
+  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
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_birthtime)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_stat_st_birthtime=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_birthtime)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_stat_st_birthtime=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_stat_st_birthtime=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+_ACEOF
+
+
+fi
+
 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
@@ -18251,9 +18612,9 @@
 echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
     (
       cat <<\_ASBOX
-## --------------------------------- ##
-## Report this to the python lists.  ##
-## --------------------------------- ##
+## ------------------------------------------------ ##
+## Report this to http://www.python.org/python-bugs ##
+## ------------------------------------------------ ##
 _ASBOX
     ) |
       sed "s/^/$as_me: WARNING:     /" >&2
@@ -19748,8 +20109,201 @@
 
 fi
 
+# 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[]
+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
+  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 <sys/types.h>
+#include <$ac_cv_struct_tm>
 
-# tzset(3) exists and works like we expect it to
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (ac_aggr.tm_zone)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_tm_tm_zone=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (sizeof ac_aggr.tm_zone)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_tm_tm_zone=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_tm_tm_zone=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+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
+_ACEOF
+
+
+fi
+
+if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TM_ZONE 1
+_ACEOF
+
+else
+  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
+  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 <time.h>
+#ifndef tzname /* For SGI.  */
+extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
+#endif
+
+int
+main ()
+{
+atoi(*tzname);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_var_tzname=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_var_tzname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+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
+#define HAVE_TZNAME 1
+_ACEOF
+
+  fi
+fi
+
+
+# check tzset(3) exists and works like we expect it to
 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
@@ -19769,37 +20323,62 @@
 #include <stdlib.h>
 #include <time.h>
 #include <string.h>
+
+#if HAVE_TZNAME
+extern char *tzname[];
+#endif
+
 int main()
 {
 	/* Note that we need to ensure that not only does tzset(3)
 	   do 'something' with localtime, but it works as documented
 	   in the library reference and as expected by the test suite.
+	   This includes making sure that tzname is set properly if
+	   tm->tm_zone does not exist since it is the alternative way
+	   of getting timezone info.
 
 	   Red Hat 6.2 doesn't understand the southern hemisphere
-	   after New Year's Day; it thinks swaps on that day.
+	   after New Year's Day.
 	*/
 
-	time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
+	time_t groundhogday = 1044144000; /* GMT-based */
 	time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
 
 	putenv("TZ=UTC+0");
 	tzset();
 	if (localtime(&groundhogday)->tm_hour != 0)
 	    exit(1);
+#if HAVE_TZNAME
+	/* For UTC, tzname[1] is sometimes "", sometimes "   " */
+	if (strcmp(tzname[0], "UTC") ||
+		(tzname[1][0] != 0 && tzname[1][0] != ' '))
+	    exit(1);
+#endif
 
 	putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
 	tzset();
 	if (localtime(&groundhogday)->tm_hour != 19)
 	    exit(1);
+#if HAVE_TZNAME
+	if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
+	    exit(1);
+#endif
 
 	putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
 	tzset();
 	if (localtime(&groundhogday)->tm_hour != 11)
 	    exit(1);
+#if HAVE_TZNAME
+	if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
+	    exit(1);
+#endif
+
+#if HAVE_STRUCT_TM_TM_ZONE
 	if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
 	    exit(1);
 	if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
 	    exit(1);
+#endif
 
 	exit(0);
 }
@@ -19907,6 +20486,73 @@
 
 fi
 
+# Look for BSD style subsecond timestamps in struct stat
+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
+  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 <sys/stat.h>
+int
+main ()
+{
+
+struct stat st;
+st.st_mtimespec.tv_nsec = 1;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_stat_tv_nsec2=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_stat_tv_nsec2=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+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
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STAT_TV_NSEC2 1
+_ACEOF
+
+fi
+
 # On HP/UX 11.0, mvwdelch is a block with a return statement
 echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
 echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
@@ -20827,6 +21473,7 @@
 s, at LN@,$LN,;t t
 s, at OPT@,$OPT,;t t
 s, at BASECFLAGS@,$BASECFLAGS,;t t
+s, at OTHER_LIBTOOL_OPT@,$OTHER_LIBTOOL_OPT,;t t
 s, at LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
 s, at SO@,$SO,;t t
 s, at LDSHARED@,$LDSHARED,;t t

Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.327.2.2
retrieving revision 1.327.2.3
diff -u -d -r1.327.2.2 -r1.327.2.3
--- configure.in	7 Jan 2005 06:56:43 -0000	1.327.2.2
+++ configure.in	16 Oct 2005 05:23:56 -0000	1.327.2.3
@@ -5,7 +5,7 @@
 
 AC_REVISION($Revision$)
 AC_PREREQ(2.53)
-AC_INIT(python, PYTHON_VERSION)
+AC_INIT(python, PYTHON_VERSION, http://www.python.org/python-bugs)
 AC_CONFIG_SRCDIR([Include/object.h])
 AC_CONFIG_HEADER(pyconfig.h)
 
@@ -171,6 +171,12 @@
       define_xopen_source=no
     fi
     ;;
+  # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
+  # disables platform specific features beyond repair.
+  Darwin/8.*)
+    define_xopen_source=no
+    ;;
+
 esac
 
 if test $define_xopen_source = yes
@@ -194,8 +200,9 @@
   # cases for HP-UX, we define it globally.
   
   AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Define to activate Unix95-and-earlier features)
-  AC_DEFINE(_POSIX_C_SOURCE, 200112L, Define to activate features from IEEE Stds 1003.1-2001)
 
+  AC_DEFINE(_POSIX_C_SOURCE, 200112L, Define to activate features from IEEE Stds 1003.1-2001)
+  
 fi
 
 #
@@ -464,9 +471,11 @@
         if test -z "$CXX"; then
               LINKCC="\$(PURIFY) \$(CC)"
         else
-              echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
-              $CXX -c conftest.$ac_ext 2>&5
-              if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
+              echo 'extern "C" void foo();int main(){foo();}' > conftest_a.cc
+              $CXX -c conftest_a.cc # 2>&5
+              echo 'void foo(){}' > conftest_b.$ac_ext
+              $CC -c conftest_b.$ac_ext # 2>&5
+              if $CC -o conftest$ac_exeext conftest_a.$ac_objext conftest_b.$ac_objext 2>&5 \
                  && test -s conftest$ac_exeext && ./conftest$ac_exeext
               then
                  LINKCC="\$(PURIFY) \$(CC)"
@@ -960,7 +969,7 @@
 
 # checks for header files
 AC_HEADER_STDC
-AC_CHECK_HEADERS(curses.h dlfcn.h fcntl.h grp.h langinfo.h \
+AC_CHECK_HEADERS(curses.h dlfcn.h fcntl.h grp.h shadow.h langinfo.h \
 libintl.h ncurses.h poll.h pthread.h \
 stropts.h termios.h thread.h \
 unistd.h utime.h \
@@ -1205,15 +1214,31 @@
 esac
 AC_MSG_RESULT($enable_toolbox_glue)
 
+AC_SUBST(OTHER_LIBTOOL_OPT)
+case $ac_sys_system/$ac_sys_release in
+  Darwin/@<:@01234567@:>@.*) 
+    OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
+    ;;
+  Darwin/*)
+    OTHER_LIBTOOL_OPT=""
+    ;;
+esac
+
 AC_SUBST(LIBTOOL_CRUFT)
 case $ac_sys_system/$ac_sys_release in
-  Darwin/1.3*)
-    LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
+  Darwin/@<:@01234567@:>@.*) 
+    LIBTOOL_CRUFT="-framework System -lcc_dynamic -arch_only ppc"
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
   Darwin/*)
-    LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
-      LIBTOOL_CRUFT="$LIBTOOL_CRUFT"
+    gcc_version=`gcc -v 2>&1 |  grep version | cut -d\  -f3`
+    if test ${gcc_version} '<' 4.0
+        then
+            LIBTOOL_CRUFT="-lcc_dynamic"
+        else 
+            LIBTOOL_CRUFT=""
+    fi
+    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -lSystem -lSystemStubs -arch_only ppc'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
 esac
@@ -1304,8 +1329,8 @@
 		LDSHARED='$(CC) $(LDFLAGS) -bundle'
 		if test "$enable_framework" ; then
 			# Link against the framework. All externals should be defined.
-			BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
-			LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
+			BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
+			LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
 		else
 			# No framework. Ignore undefined symbols, assuming they come from Python
 			LDSHARED="$LDSHARED -undefined suppress"
@@ -1314,8 +1339,8 @@
 		LDSHARED='$(CC) $(LDFLAGS) -bundle'
 		if test "$enable_framework" ; then
 			# Link against the framework. All externals should be defined.
-			BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
-			LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
+			BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
+			LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
 		else
 			# No framework, use the Python app as bundle-loader
 			BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
@@ -1325,17 +1350,17 @@
 		# Use -undefined dynamic_lookup whenever possible (10.3 and later).
 		# This allows an extension to be used in any Python
 		cur_target=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'`
+		CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
 		if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
 		then
 			LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
 			BLDSHARED="$LDSHARED"
-			CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
 		else
 			LDSHARED='$(CC) $(LDFLAGS) -bundle'
 			if test "$enable_framework" ; then
 				# Link against the framework. All externals should be defined.
-				BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
-				LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
+				BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
+				LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
 			else
 				# No framework, use the Python app as bundle-loader
 				BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
@@ -1427,7 +1452,7 @@
 		LINKFORSHARED="$extra_undefs"
 		if test "$enable_framework"
 		then
-			LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework "'$(PYTHONFRAMEWORK)'
+			LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
 		fi
 		LINKFORSHARED="$LINKFORSHARED";;
 	OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
@@ -2076,7 +2101,7 @@
 AC_CHECK_FUNCS(alarm bind_textdomain_codeset chown clock confstr ctermid \
  execv fork fpathconf ftime ftruncate \
  gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
- getpriority getpwent getsid getwd \
+ getpriority getpwent getspnam getspent getsid getwd \
  kill killpg lchown lstat mkfifo mknod mktime \
  mremap nice pathconf pause plock poll pthread_init \
  putenv readlink realpath \
@@ -2398,6 +2423,9 @@
 AC_STRUCT_TIMEZONE
 AC_CHECK_MEMBERS([struct stat.st_rdev])
 AC_CHECK_MEMBERS([struct stat.st_blksize])
+AC_CHECK_MEMBERS([struct stat.st_flags])
+AC_CHECK_MEMBERS([struct stat.st_gen])
+AC_CHECK_MEMBERS([struct stat.st_birthtime])
 AC_STRUCT_ST_BLOCKS
 
 AC_MSG_CHECKING(for time.h that defines altzone)
@@ -2917,45 +2945,74 @@
       [Define if poll() sets errno on invalid file descriptors.])
 fi
 
+# 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[]
+AC_STRUCT_TIMEZONE
 
-# tzset(3) exists and works like we expect it to
+# check tzset(3) exists and works like we expect it to
 AC_MSG_CHECKING(for working tzset())
 AC_CACHE_VAL(ac_cv_working_tzset, [
 AC_TRY_RUN([
 #include <stdlib.h>
 #include <time.h>
 #include <string.h>
+
+#if HAVE_TZNAME
+extern char *tzname[];
+#endif
+
 int main()
 {
 	/* Note that we need to ensure that not only does tzset(3)
 	   do 'something' with localtime, but it works as documented
 	   in the library reference and as expected by the test suite.
+	   This includes making sure that tzname is set properly if
+	   tm->tm_zone does not exist since it is the alternative way
+	   of getting timezone info.
 
 	   Red Hat 6.2 doesn't understand the southern hemisphere 
-	   after New Year's Day; it thinks swaps on that day.
+	   after New Year's Day.
 	*/
 
-	time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
+	time_t groundhogday = 1044144000; /* GMT-based */
 	time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
 
 	putenv("TZ=UTC+0");
 	tzset();
 	if (localtime(&groundhogday)->tm_hour != 0)
 	    exit(1);
+#if HAVE_TZNAME
+	/* For UTC, tzname[1] is sometimes "", sometimes "   " */
+	if (strcmp(tzname[0], "UTC") || 
+		(tzname[1][0] != 0 && tzname[1][0] != ' '))
+	    exit(1);
+#endif
 
 	putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
 	tzset();
 	if (localtime(&groundhogday)->tm_hour != 19)
 	    exit(1);
+#if HAVE_TZNAME
+	if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
+	    exit(1);
+#endif
 
 	putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
 	tzset();
 	if (localtime(&groundhogday)->tm_hour != 11)
 	    exit(1);
+#if HAVE_TZNAME
+	if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
+	    exit(1);
+#endif
+
+#if HAVE_STRUCT_TM_TM_ZONE
 	if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
 	    exit(1);
 	if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
 	    exit(1);
+#endif
 
 	exit(0);
 }
@@ -2987,6 +3044,23 @@
   [Define if you have struct stat.st_mtim.tv_nsec])
 fi
 
+# Look for BSD style subsecond timestamps in struct stat
+AC_MSG_CHECKING(for tv_nsec2 in struct stat)
+AC_CACHE_VAL(ac_cv_stat_tv_nsec2,
+AC_TRY_COMPILE([#include <sys/stat.h>], [
+struct stat st;
+st.st_mtimespec.tv_nsec = 1;
+],
+ac_cv_stat_tv_nsec2=yes,
+ac_cv_stat_tv_nsec2=no,
+ac_cv_stat_tv_nsec2=no))
+AC_MSG_RESULT($ac_cv_stat_tv_nsec2)
+if test "$ac_cv_stat_tv_nsec2" = yes
+then
+  AC_DEFINE(HAVE_STAT_TV_NSEC2, 1,
+  [Define if you have struct stat.st_mtimensec])
+fi
+
 # On HP/UX 11.0, mvwdelch is a block with a return statement
 AC_MSG_CHECKING(whether mvwdelch is an expression)
 AC_CACHE_VAL(ac_cv_mvwdelch_is_expression,

Index: pyconfig.h.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v
retrieving revision 1.42.2.2
retrieving revision 1.42.2.3
diff -u -d -r1.42.2.2 -r1.42.2.3
--- pyconfig.h.in	7 Jan 2005 06:56:44 -0000	1.42.2.2
+++ pyconfig.h.in	16 Oct 2005 05:23:56 -0000	1.42.2.3
@@ -215,6 +215,12 @@
 /* Define to 1 if you have the `getsid' function. */
 #undef HAVE_GETSID
 
+/* Define to 1 if you have the `getspent' function. */
+#undef HAVE_GETSPENT
+
+/* Define to 1 if you have the `getspnam' function. */
+#undef HAVE_GETSPNAM
+
 /* Define to 1 if you have the `gettimeofday' function. */
 #undef HAVE_GETTIMEOFDAY
 
@@ -419,6 +425,9 @@
 /* Define to 1 if you have the `setvbuf' function. */
 #undef HAVE_SETVBUF
 
+/* Define to 1 if you have the <shadow.h> header file. */
+#undef HAVE_SHADOW_H
+
 /* Define to 1 if you have the `sigaction' function. */
 #undef HAVE_SIGACTION
 
@@ -446,6 +455,9 @@
 /* Define if you have struct stat.st_mtim.tv_nsec */
 #undef HAVE_STAT_TV_NSEC
 
+/* Define if you have struct stat.st_mtimensec */
+#undef HAVE_STAT_TV_NSEC2
+
 /* Define if your compiler supports variable length function prototypes (e.g.
    void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */
 #undef HAVE_STDARG_PROTOTYPES
@@ -474,12 +486,21 @@
 /* Define to 1 if you have the <stropts.h> header file. */
 #undef HAVE_STROPTS_H
 
+/* Define to 1 if `st_birthtime' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BIRTHTIME
+
 /* Define to 1 if `st_blksize' is member of `struct stat'. */
 #undef HAVE_STRUCT_STAT_ST_BLKSIZE
 
 /* Define to 1 if `st_blocks' is member of `struct stat'. */
 #undef HAVE_STRUCT_STAT_ST_BLOCKS
 
+/* Define to 1 if `st_flags' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_FLAGS
+
+/* Define to 1 if `st_gen' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_GEN
+
 /* Define to 1 if `st_rdev' is member of `struct stat'. */
 #undef HAVE_STRUCT_STAT_ST_RDEV
 

Index: setup.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/setup.py,v
retrieving revision 1.98.2.2
retrieving revision 1.98.2.3
diff -u -d -r1.98.2.2 -r1.98.2.3
--- setup.py	7 Jan 2005 06:56:44 -0000	1.98.2.2
+++ setup.py	16 Oct 2005 05:23:56 -0000	1.98.2.3
@@ -171,8 +171,8 @@
         # unfortunately, distutils doesn't let us provide separate C and C++
         # compilers
         if compiler is not None:
-            (ccshared,opt,base) = sysconfig.get_config_vars('CCSHARED','OPT','BASECFLAGS')
-            args['compiler_so'] = compiler + ' ' + opt + ' ' + ccshared + ' ' + base
+            (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS')
+            args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags
         self.compiler.set_executables(**args)
 
         build_ext.build_extensions(self)
@@ -295,6 +295,9 @@
         inc_dirs = self.compiler.include_dirs + ['/usr/include']
         exts = []
 
+        config_h = sysconfig.get_config_h_filename()
+        config_h_vars = sysconfig.parse_config_h(open(config_h))
+
         platform = self.get_platform()
         (srcdir,) = sysconfig.get_config_vars('srcdir')
 
@@ -355,6 +358,8 @@
         exts.append( Extension("_heapq", ["_heapqmodule.c"]) )
         # operator.add() and similar goodies
         exts.append( Extension('operator', ['operator.c']) )
+        # functional
+        exts.append( Extension("functional", ["functionalmodule.c"]) )
         # Python C API test module
         exts.append( Extension('_testcapi', ['_testcapimodule.c']) )
         # static Unicode character database
@@ -384,22 +389,17 @@
         # fcntl(2) and ioctl(2)
         exts.append( Extension('fcntl', ['fcntlmodule.c']) )
         if platform not in ['mac']:
-                # pwd(3)
+            # pwd(3)
             exts.append( Extension('pwd', ['pwdmodule.c']) )
             # grp(3)
             exts.append( Extension('grp', ['grpmodule.c']) )
+            # spwd, shadow passwords
+            if (config_h_vars.get('HAVE_GETSPNAM', False) or
+                    config_h_vars.get('HAVE_GETSPENT', False)):
+                exts.append( Extension('spwd', ['spwdmodule.c']) )
         # select(2); not on ancient System V
         exts.append( Extension('select', ['selectmodule.c']) )
 
-        # The md5 module implements the RSA Data Security, Inc. MD5
-        # Message-Digest Algorithm, described in RFC 1321.  The
-        # necessary files md5c.c and md5.h are included here.
-        exts.append( Extension('md5', ['md5module.c', 'md5c.c']) )
-
-        # The sha module implements the SHA checksum algorithm.
-        # (NIST's Secure Hash Algorithm.)
-        exts.append( Extension('sha', ['shamodule.c']) )
-
         # Helper module for various ascii-encoders
         exts.append( Extension('binascii', ['binascii.c']) )
 
@@ -474,10 +474,12 @@
         exts.append( Extension('_socket', ['socketmodule.c'],
                                depends = ['socketmodule.h']) )
         # Detect SSL support for the socket module (via _ssl)
-        ssl_incs = find_file('openssl/ssl.h', inc_dirs,
-                             ['/usr/local/ssl/include',
+        search_for_ssl_incs_in = [
+                              '/usr/local/ssl/include',
                               '/usr/contrib/ssl/include/'
                              ]
+        ssl_incs = find_file('openssl/ssl.h', inc_dirs,
+                             search_for_ssl_incs_in
                              )
         if ssl_incs is not None:
             krb5_h = find_file('krb5.h', inc_dirs,
@@ -497,6 +499,52 @@
                                    libraries = ['ssl', 'crypto'],
                                    depends = ['socketmodule.h']), )
 
+        # find out which version of OpenSSL we have
+        openssl_ver = 0
+        openssl_ver_re = re.compile(
+            '^\s*#\s*define\s+OPENSSL_VERSION_NUMBER\s+(0x[0-9a-fA-F]+)' )
+        for ssl_inc_dir in inc_dirs + search_for_ssl_incs_in:
+            name = os.path.join(ssl_inc_dir, 'openssl', 'opensslv.h')
+            if os.path.isfile(name):
+                try:
+                    incfile = open(name, 'r')
+                    for line in incfile:
+                        m = openssl_ver_re.match(line)
+                        if m:
+                            openssl_ver = eval(m.group(1))
+                            break
+                except IOError:
+                    pass
+
+            # first version found is what we'll use (as the compiler should)
+            if openssl_ver:
+                break
+
+        #print 'openssl_ver = 0x%08x' % openssl_ver
+
+        if (ssl_incs is not None and
+            ssl_libs is not None and
+            openssl_ver >= 0x00907000):
+            # The _hashlib module wraps optimized implementations
+            # of hash functions from the OpenSSL library.
+            exts.append( Extension('_hashlib', ['_hashopenssl.c'],
+                                   include_dirs = ssl_incs,
+                                   library_dirs = ssl_libs,
+                                   libraries = ['ssl', 'crypto']) )
+        else:
+            # The _sha module implements the SHA1 hash algorithm.
+            exts.append( Extension('_sha', ['shamodule.c']) )
+            # The _md5 module implements the RSA Data Security, Inc. MD5
+            # Message-Digest Algorithm, described in RFC 1321.  The
+            # necessary files md5c.c and md5.h are included here.
+            exts.append( Extension('_md5', ['md5module.c', 'md5c.c']) )
+
+        if (openssl_ver < 0x00908000):
+            # OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash
+            exts.append( Extension('_sha256', ['sha256module.c']) )
+            exts.append( Extension('_sha512', ['sha512module.c']) )
+
+
         # Modules that provide persistent dictionary-like semantics.  You will
         # probably want to arrange for at least one of them to be available on
         # your machine, though none are defined by default because of library
@@ -592,7 +640,9 @@
                 # XXX should we -ever- look for a dbX name?  Do any
                 # systems really not name their library by version and
                 # symlink to more general names?
-                for dblib in (('db-%d.%d' % db_ver), ('db%d' % db_ver[0])):
+                for dblib in (('db-%d.%d' % db_ver),
+                              ('db%d%d' % db_ver),
+                              ('db%d' % db_ver[0])):
                     dblib_file = self.compiler.find_library_file(
                                     db_dirs_to_check + lib_dirs, dblib )
                     if dblib_file:
@@ -777,8 +827,6 @@
             ('BYTEORDER', xmlbo),
             ('XML_CONTEXT_BYTES','1024'),
             ]
-        config_h = sysconfig.get_config_h_filename()
-        config_h_vars = sysconfig.parse_config_h(open(config_h))
         for feature_macro in ['HAVE_MEMMOVE', 'HAVE_BCOPY']:
             if config_h_vars.has_key(feature_macro):
                 define_macros.append((feature_macro, '1'))
@@ -793,11 +841,12 @@
                               ))
 
         # Hye-Shik Chang's CJKCodecs modules.
-        exts.append(Extension('_multibytecodec',
-                              ['cjkcodecs/multibytecodec.c']))
-        for loc in ('kr', 'jp', 'cn', 'tw', 'hk', 'iso2022'):
-            exts.append(Extension('_codecs_' + loc,
-                                  ['cjkcodecs/_codecs_%s.c' % loc]))
+        if have_unicode:
+            exts.append(Extension('_multibytecodec',
+                                  ['cjkcodecs/multibytecodec.c']))
+            for loc in ('kr', 'jp', 'cn', 'tw', 'hk', 'iso2022'):
+                exts.append(Extension('_codecs_' + loc,
+                                      ['cjkcodecs/_codecs_%s.c' % loc]))
 
         # Dynamic loading module
         if sys.maxint == 0x7fffffff:
@@ -811,7 +860,8 @@
             # Linux-specific modules
             exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
 
-        if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6'):
+        if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
+                        'freebsd7'):
             exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
 
         if platform == 'sunos5':



More information about the Python-checkins mailing list