The libsocket/libnsl problem is specific to IRIX 4. Confirmed by Tim Rice.
diff --git a/configure b/configure
index 2b8b404..f6a8cce 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.368 .
+# From configure.in Revision: 1.369 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.53 for python 2.3.
 #
@@ -9717,7 +9717,7 @@
 esac
 
 # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
-# However on SGI IRIX, these exist but are broken.
+# However on SGI IRIX 4, these exist but are broken.
 # BeOS' sockets are stashed in libnet.
 case "$ac_sys_system" in
 IRIX*) ;;