[Part of patch #641685] Add .dylib as an extension for shared libraries
diff --git a/Lib/distutils/extension.py b/Lib/distutils/extension.py
index e420944..94b56e6 100644
--- a/Lib/distutils/extension.py
+++ b/Lib/distutils/extension.py
@@ -214,7 +214,7 @@
                 ext.extra_link_args.append(word)
                 if not value:
                     append_next_word = ext.extra_link_args
-            elif suffix in (".a", ".so", ".sl", ".o"):
+            elif suffix in (".a", ".so", ".sl", ".o", ".dylib"):
                 # NB. a really faithful emulation of makesetup would
                 # append a .o file to extra_objects only if it
                 # had a slash in it; otherwise, it would s/.o/.c/