Index: configure.in =================================================================== --- configure.in (revision 67986) +++ configure.in (working copy) @@ -737,6 +737,12 @@ BLDLIBRARY='-L. -lpython$(VERSION)' RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib} ;; + Darwin*) + LDLIBRARY='libpython$(VERSION).dylib' + BLDLIBRARY='-L. -lpython$(VERSION)' + RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}' + ;; + esac else # shared is disabled case $ac_sys_system in @@ -1582,6 +1588,7 @@ esac ;; CYGWIN*) SO=.dll;; + Darwin*) SO=.dylib;; *) SO=.so;; esac else Index: Makefile.pre.in =================================================================== --- Makefile.pre.in (revision 67986) +++ Makefile.pre.in (working copy) @@ -418,6 +418,10 @@ $(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ fi +libpython$(VERSION).dylib: $(LIBRARY_OBJS) + $(CC) -dynamiclib -Wl,-single_module $(LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(VERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ + + libpython$(VERSION).sl: $(LIBRARY_OBJS) $(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST) Index: Lib/distutils/sysconfig.py =================================================================== --- Lib/distutils/sysconfig.py (revision 67986) +++ Lib/distutils/sysconfig.py (working copy) @@ -396,6 +396,10 @@ % (cur_target, cfg_target)) raise DistutilsPlatformError(my_msg) + if sys.platform == 'darwin': + g['SO'] = '.so' + + # On AIX, there are wrong paths to the linker scripts in the Makefile # -- these paths are relative to the Python source, but when installed # the scripts are in another directory.