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

........
  r72445 | tarek.ziade | 2009-05-07 23:20:34 +0200 (Thu, 07 May 2009) | 1 line

  Fixed #5941: added ARFLAGS for the archiver command.
........
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index fbeb45f..223ff67 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, ar) = \
+        (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \
             get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
-                            'CCSHARED', 'LDSHARED', 'SO', 'AR')
+                            'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS')
 
         if 'CC' in os.environ:
             cc = os.environ['CC']
@@ -185,6 +185,10 @@
             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
         if 'AR' in os.environ:
             ar = os.environ['AR']
+        if 'ARFLAGS' in os.environ:
+            archiver = ar + ' ' + os.environ['ARFLAGS']
+        else:
+            archiver = ar + ' ' + ar_flags
 
         cc_cmd = cc + ' ' + cflags
         compiler.set_executables(
@@ -194,7 +198,7 @@
             compiler_cxx=cxx,
             linker_so=ldshared,
             linker_exe=cc,
-            archiver=ar)
+            archiver=archiver)
 
         compiler.shared_lib_extension = so_ext