--- ./setup.py.aixsetup	2003-10-21 20:01:21.000000000 +0000
+++ ./setup.py	2005-06-22 21:26:34.000000000 +0000
@@ -1012,10 +1012,14 @@
             libs.append('BLT')
 
         # Add the Tcl/Tk libraries
+	# XXX: I really just want to add the "-Wl,-brtl" option, but I
+	# am not sure how.  I will fake it out by putting it at the end
+	# of an extra lib_dirs.
+        added_lib_dirs.append('/usr/lib -Wl,-brtl')
         libs.append('tk'+ version)
         libs.append('tcl'+ version)
 
-        if platform in ['aix3', 'aix4']:
+        if platform in ['aix3', 'aix4', 'aix5']:
             libs.append('ld')
 
         # Finally, link with the X11 libraries (not appropriate on cygwin)
--- ./Makefile.pre.in.aixsetup	2003-11-18 19:54:00.000000000 +0000
+++ ./Makefile.pre.in	2005-06-22 22:58:50.000000000 +0000
@@ -345,14 +345,14 @@
 
 libpython$(VERSION).so: $(LIBRARY_OBJS)
 	if test $(INSTSONAME) != $(LDLIBRARY); then \
-		$(LDSHARED) -Wl,-soname=$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
+		$(BLDSHARED) -Wl,-soname=$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
 		$(LN) -f $(INSTSONAME) $@; \
 	else\
-		$(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
+		$(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
 	fi
 
 libpython$(VERSION).sl: $(LIBRARY_OBJS)
-	$(LDSHARED) -o $@ $(LIBRARY_OBJS) $(LIBC) $(LIBM)
+	$(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(LIBC) $(LIBM)
 
 # This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
 # minimal framework (not including the Lib directory and such) in the current
@@ -608,10 +608,7 @@
 		if test "$(SO)" = .dll; then \
 			$(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(BINDIR); \
 		else \
-			$(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
-			if test libpython$(VERSION)$(SO) != $(INSTSONAME); then \
-				(cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) libpython$(VERSION)$(SO)); \
-			fi \
+			$(INSTALL_SHARED) $(INSTSONAME) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
 		fi; \
 	else	true; \
 	fi
