Merged revisions 69342 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r69342 | tarek.ziade | 2009-02-06 02:15:51 +0100 (Fri, 06 Feb 2009) | 1 line

  fixed #1520877: now distutils reads Read  from the environment/Makefile
........
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index de8c5fc..386ae89 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -160,9 +160,9 @@
     varies across Unices and is stored in Python's Makefile.
     """
     if compiler.compiler_type == "unix":
-        (cc, cxx, opt, cflags, ccshared, ldshared, so_ext) = \
+        (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar) = \
             get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
-                            'CCSHARED', 'LDSHARED', 'SO')
+                            'CCSHARED', 'LDSHARED', 'SO', 'AR')
 
         if 'CC' in os.environ:
             cc = os.environ['CC']
@@ -183,6 +183,8 @@
             cpp = cpp + ' ' + os.environ['CPPFLAGS']
             cflags = cflags + ' ' + os.environ['CPPFLAGS']
             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
+        if 'AR' in os.environ:
+            ar = os.environ['AR']
 
         cc_cmd = cc + ' ' + cflags
         compiler.set_executables(
@@ -191,7 +193,8 @@
             compiler_so=cc_cmd + ' ' + ccshared,
             compiler_cxx=cxx,
             linker_so=ldshared,
-            linker_exe=cc)
+            linker_exe=cc,
+            archiver=ar)
 
         compiler.shared_lib_extension = so_ext