Index: Python-1.5.2/configure
diff -c Python-1.5.2/configure:1.1.1.1 Python-1.5.2/configure:1.4
*** Python-1.5.2/configure:1.1.1.1	Thu Jun  8 17:15:59 2000
--- Python-1.5.2/configure	Sat Apr  7 13:46:23 2001
***************
*** 998,1004 ****
  then
  	case $ac_sys_system in
  	AIX*)
! 	   LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
  	BeOS*)
  	   LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
  	   LDLIBRARY='libpython$(VERSION).so';;
--- 998,1018 ----
  then
  	case $ac_sys_system in
  	AIX*)
! 	   # AIX on POWER has different link syntax than AIX on IA64
! 	   # So we need to determine our platform.
! 	    case "`lsattr -El proc0 -a type -F value`" in
! 		Itanium)  IBM_ARCH=ia64
! 			  IBM_CPU=intel	;;
! 		POWER*)	  IBM_ARCH=power
! 			  IBM_CPU=ibm ;;
! 		*)	  IBM_ARCH=powerpc
! 			  IBM_CPU=ibm ;;
! 	    esac
! 	   if test "$IBM_ARCH" != "ia64"; then
! 	      LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)"
! 	   else
! 	      LINKCC="\$(PURIFY) \$(CC)"
! 	   fi ;;
  	BeOS*)
  	   LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
  	   LDLIBRARY='libpython$(VERSION).so';;
***************
*** 2227,2233 ****
  if test -z "$LDSHARED"
  then
  	case $ac_sys_system/$ac_sys_release in
! 	AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
  	BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
  	IRIX/5*) LDSHARED="ld -shared";;
  	IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
--- 2241,2252 ----
  if test -z "$LDSHARED"
  then
  	case $ac_sys_system/$ac_sys_release in
! 	AIX*)
! 	    if test "$IBM_ARCH" != "ia64"; then
! 		LDSHARED="\$(srcdir)/ld_so_aix \$(CC) \$(LDFLAGS)"
! 	    else
! 		LDSHARED="ld -G"
! 	    fi ;;
  	BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
  	IRIX/5*) LDSHARED="ld -shared";;
  	IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
***************
*** 2289,2295 ****
  if test -z "$LINKFORSHARED"
  then
  	case $ac_sys_system/$ac_sys_release in
! 	AIX*)	LINKFORSHARED='-Wl,-bE:python.exp -lld';;
  	hp*|HP*)
  	    LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
  	FreeBSD/3*) LINKFORSHARED="-Xlinker -export-dynamic";;
--- 2308,2318 ----
  if test -z "$LINKFORSHARED"
  then
  	case $ac_sys_system/$ac_sys_release in
! 	AIX*)
! 	    # AIX on IA64 does not need LINKFORSHARED set
! 	    if test "$IBM_ARCH" != "ia64"; then
! 		LINKFORSHARED='-Wl,-bE:python.exp -lld'
! 	    fi ;;
  	hp*|HP*)
  	    LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
  	FreeBSD/3*) LINKFORSHARED="-Xlinker -export-dynamic";;
Index: Python-1.5.2/configure.in
diff -c Python-1.5.2/configure.in:1.1.1.1 Python-1.5.2/configure.in:1.3
*** Python-1.5.2/configure.in:1.1.1.1	Thu Jun  8 17:15:59 2000
--- Python-1.5.2/configure.in	Sat Apr  7 13:46:23 2001
***************
*** 196,202 ****
  then
  	case $ac_sys_system in
  	AIX*)
! 	   LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
  	BeOS*)
  	   LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
  	   LDLIBRARY='libpython$(VERSION).so';;
--- 196,216 ----
  then
  	case $ac_sys_system in
  	AIX*)
! 	   # AIX on POWER has different	link syntax than AIX on	IA64
! 	   # So	we need	to determine our platform.
! 	    case "`lsattr -El proc0 -a type -F value`" in
! 		Itanium)  IBM_ARCH=ia64
! 			  IBM_CPU=intel	;;
! 		POWER*)	  IBM_ARCH=power
! 			  IBM_CPU=ibm ;;
! 		*)	  IBM_ARCH=powerpc
! 			  IBM_CPU=ibm ;;
! 	    esac
! 	   if test "$IBM_ARCH" != "ia64"; then
! 	      LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)"
! 	   else
! 	      LINKCC="\$(PURIFY) \$(CC)"
! 	   fi ;;
  	BeOS*)
  	   LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
  	   LDLIBRARY='libpython$(VERSION).so';;
***************
*** 448,454 ****
  if test -z "$LDSHARED"
  then
  	case $ac_sys_system/$ac_sys_release in
! 	AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
  	BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
  	IRIX/5*) LDSHARED="ld -shared";;
  	IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
--- 462,473 ----
  if test -z "$LDSHARED"
  then
  	case $ac_sys_system/$ac_sys_release in
! 	AIX*)
! 	    if test "$IBM_ARCH"	!= "ia64"; then
! 		LDSHARED="\$(srcdir)/ld_so_aix \$(CC) \$(LDFLAGS)"
! 	    else
! 		LDSHARED="ld -G"
! 	    fi ;;
  	BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
  	IRIX/5*) LDSHARED="ld -shared";;
  	IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
***************
*** 508,514 ****
  if test -z "$LINKFORSHARED"
  then
  	case $ac_sys_system/$ac_sys_release in
! 	AIX*)	LINKFORSHARED='-Wl,-bE:python.exp -lld';;
  	hp*|HP*)
  	    LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
  	FreeBSD/3*) LINKFORSHARED="-Xlinker -export-dynamic";;
--- 527,537 ----
  if test -z "$LINKFORSHARED"
  then
  	case $ac_sys_system/$ac_sys_release in
! 	AIX*)
! 	    # AIX on IA64 does not need	LINKFORSHARED set
! 	    if test "$IBM_ARCH"	!= "ia64"; then
! 		LINKFORSHARED='-Wl,-bE:python.exp -lld'
! 	    fi ;;
  	hp*|HP*)
  	    LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
  	FreeBSD/3*) LINKFORSHARED="-Xlinker -export-dynamic";;
Index: Python-1.5.2/Modules/Setup.in
diff -c Python-1.5.2/Modules/Setup.in:1.1.1.1 Python-1.5.2/Modules/Setup.in:1.3
*** Python-1.5.2/Modules/Setup.in:1.1.1.1	Thu Jun  8 17:16:12 2000
--- Python-1.5.2/Modules/Setup.in	Sat Apr  7 07:52:27 2001
***************
*** 112,118 ****
  # modules are to be built as shared libraries (see above for more
  # detail; also note that *static* reverses this effect):
  
! #*shared*
  
  # GNU readline.  Unlike previous Python incarnations, GNU readline is
  # now incorporated in an optional module, configured in the Setup file
--- 112,118 ----
  # modules are to be built as shared libraries (see above for more
  # detail; also note that *static* reverses this effect):
  
! *shared*
  
  # GNU readline.  Unlike previous Python incarnations, GNU readline is
  # now incorporated in an optional module, configured in the Setup file
***************
*** 122,128 ****
  # it, depending on your system -- see the GNU readline instructions.
  # It's okay for this to be a shared library, too.
  
! #readline readline.c -lreadline -ltermcap
  
  
  # Modules that should always be present (non UNIX dependent):
--- 122,128 ----
  # it, depending on your system -- see the GNU readline instructions.
  # It's okay for this to be a shared library, too.
  
! readline readline.c -lreadline -lcurses
  
  
  # Modules that should always be present (non UNIX dependent):
***************
*** 135,141 ****
  time timemodule.c # -lm # time operations and variables
  operator operator.c	# operator.add() and similar goodies
  
! #_locale _localemodule.c  # access to ISO C locale support
  
  
  # Modules with some UNIX dependencies -- on by default:
--- 135,141 ----
  time timemodule.c # -lm # time operations and variables
  operator operator.c	# operator.add() and similar goodies
  
! _locale _localemodule.c  # access to ISO C locale support
  
  
  # Modules with some UNIX dependencies -- on by default:
***************
*** 152,165 ****
  
  # The crypt module is now disabled by default because it breaks builds
  # on many systems (where -lcrypt is needed), e.g. Linux (I believe).
! #crypt cryptmodule.c # -lcrypt	# crypt(3); needs -lcrypt on some systems
  
  
  # Some more UNIX dependent modules -- off by default, since these
  # are not supported by all UNIX systems:
  
! #nis nismodule.c 	# Sun yellow pages -- not everywhere
! #termios termios.c	# Steen Lumholt's termios module
  #resource resource.c	# Jeremy Hylton's rlimit interface
  
  
--- 152,165 ----
  
  # The crypt module is now disabled by default because it breaks builds
  # on many systems (where -lcrypt is needed), e.g. Linux (I believe).
! crypt cryptmodule.c # -lcrypt	# crypt(3); needs -lcrypt on some systems
  
  
  # Some more UNIX dependent modules -- off by default, since these
  # are not supported by all UNIX systems:
  
! # nis nismodule.c 	# Sun yellow pages -- not everywhere
! termios termios.c	# Steen Lumholt's termios module
  #resource resource.c	# Jeremy Hylton's rlimit interface
  
  
***************
*** 168,175 ****
  # These represent audio samples or images as strings:
  
  #audioop audioop.c	# Operations on audio samples
! #imageop imageop.c	# Operations on images
! #rgbimg rgbimgmodule.c   # Read SGI RGB image files (but coded portably)
  
  
  # The stdwin module provides a simple, portable (between X11 and Mac)
--- 168,175 ----
  # These represent audio samples or images as strings:
  
  #audioop audioop.c	# Operations on audio samples
! imageop imageop.c	# Operations on images
! rgbimg rgbimgmodule.c   # Read SGI RGB image files (but coded portably)
  
  
  # The stdwin module provides a simple, portable (between X11 and Mac)
***************
*** 263,269 ****
  
  # George Neville-Neil's timing module:
  
! #timing timingmodule.c
  
  
  # The _tkinter module.
--- 263,269 ----
  
  # George Neville-Neil's timing module:
  
! timing timingmodule.c
  
  
  # The _tkinter module.
***************
*** 281,291 ****
  # every system.
  
  # *** Always uncomment this (leave the leading underscore in!):
! # _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
  # *** Uncomment and edit to reflect where your Tcl/Tk headers are:
! #	-I/usr/local/include \
  # *** Uncomment and edit to reflect where your X11 header files are:
! #	-I/usr/X11R6/include \
  # *** Or uncomment this for Solaris:
  #	-I/usr/openwin/include \
  # *** Uncomment and edit for Tix extension only:
--- 281,291 ----
  # every system.
  
  # *** Always uncomment this (leave the leading underscore in!):
! _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
  # *** Uncomment and edit to reflect where your Tcl/Tk headers are:
! 	-I/usr/include \
  # *** Uncomment and edit to reflect where your X11 header files are:
! 	-I/usr/lpp/X11/include \
  # *** Or uncomment this for Solaris:
  #	-I/usr/openwin/include \
  # *** Uncomment and edit for Tix extension only:
***************
*** 297,307 ****
  # *** Uncomment and edit for TOGL extension only:
  #	-DWITH_TOGL togl.c \
  # *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
! #	-L/usr/local/lib \
  # *** Uncomment and edit to reflect your Tcl/Tk versions:
! #	-ltk8.0 -ltcl8.0 \
  # *** Uncomment and edit to reflect where your X11 libraries are:
! #	-L/usr/X11R6/lib \
  # *** Or uncomment this for Solaris:
  #	-L/usr/openwin/lib \
  # *** Uncomment these for TOGL extension only:
--- 297,307 ----
  # *** Uncomment and edit for TOGL extension only:
  #	-DWITH_TOGL togl.c \
  # *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
! 	-L/usr/lib \
  # *** Uncomment and edit to reflect your Tcl/Tk versions:
! 	-ltk8.3 -ltcl8.3 \
  # *** Uncomment and edit to reflect where your X11 libraries are:
! 	-L/usr/lpp/X11/lib/R6 \
  # *** Or uncomment this for Solaris:
  #	-L/usr/openwin/lib \
  # *** Uncomment these for TOGL extension only:
***************
*** 309,320 ****
  # *** Uncomment for AIX:
  #	-lld \
  # *** Always uncomment this; X11 libraries to link with:
! #	-lX11
  
  # Lance Ellinghaus's modules:
  
  rotor rotormodule.c		# enigma-inspired encryption
! #syslog syslogmodule.c		# syslog daemon interface
  
  
  # Lance's curses module.  This requires the System V version of
--- 309,320 ----
  # *** Uncomment for AIX:
  #	-lld \
  # *** Always uncomment this; X11 libraries to link with:
! 	-lX11
  
  # Lance Ellinghaus's modules:
  
  rotor rotormodule.c		# enigma-inspired encryption
! syslog syslogmodule.c		# syslog daemon interface
  
  
  # Lance's curses module.  This requires the System V version of
***************
*** 348,358 ****
  
  # The standard Unix dbm module:
  
! #dbm dbmmodule.c 	# dbm(3) may require -lndbm or similar
  
  # Anthony Baxter's gdbm module.  GNU dbm(3) will require -lgdbm:
  
! #gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm
  
  
  # Berkeley DB interface.
--- 348,358 ----
  
  # The standard Unix dbm module:
  
! dbm dbmmodule.c 	# dbm(3) may require -lndbm or similar
  
  # Anthony Baxter's gdbm module.  GNU dbm(3) will require -lgdbm:
  
! gdbm gdbmmodule.c -lgdbm
  
  
  # Berkeley DB interface.
***************
*** 406,412 ****
  # Andrew Kuchling's zlib module.
  # This require zlib 1.1.3 (or later).
  # See http://www.cdrom.com/pub/infozip/zlib/
! #zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
  
  
  # Example -- included for reference only:
--- 406,412 ----
  # Andrew Kuchling's zlib module.
  # This require zlib 1.1.3 (or later).
  # See http://www.cdrom.com/pub/infozip/zlib/
! zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
  
  
  # Example -- included for reference only:
Index: Python-1.5.2/Python/importdl.c
diff -c Python-1.5.2/Python/importdl.c:1.1.1.1 Python-1.5.2/Python/importdl.c:1.2
*** Python-1.5.2/Python/importdl.c:1.1.1.1	Thu Jun  8 17:16:16 2000
--- Python-1.5.2/Python/importdl.c	Sat Apr  7 12:40:39 2001
***************
*** 173,179 ****
  #define USE_SHLIB
  #endif
  
! #ifdef _AIX
  #undef USE_SHLIB /* AIX 4.2 and higher have dlfcn.h but we don't want it */
  #define DYNAMIC_LINK
  #define SHORT_EXT ".so"
--- 173,179 ----
  #define USE_SHLIB
  #endif
  
! #if defined(_AIX) && defined(_POWER)
  #undef USE_SHLIB /* AIX 4.2 and higher have dlfcn.h but we don't want it */
  #define DYNAMIC_LINK
  #define SHORT_EXT ".so"
***************
*** 458,464 ****
  		p = (dl_funcptr) dlsym(handle, funcname);
  	}
  #endif /* USE_SHLIB */
! #ifdef _AIX
  	/*
  	-- Invoke load() with L_NOAUTODEFER leaving the imported symbols
  	-- of the shared module unresolved. Thus we have to resolve them
--- 458,464 ----
  		p = (dl_funcptr) dlsym(handle, funcname);
  	}
  #endif /* USE_SHLIB */
! #if defined(_AIX) && defined(_POWER)
  	/*
  	-- Invoke load() with L_NOAUTODEFER leaving the imported symbols
  	-- of the shared module unresolved. Thus we have to resolve them
***************
*** 877,883 ****
  }
  
  
! #ifdef _AIX
  
  #include <ctype.h>	/*  for isdigit()	  */
  #include <errno.h>	/*  for global errno      */
--- 877,883 ----
  }
  
  
! #if defined(_AIX) && defined(_POWER)
  
  #include <ctype.h>	/*  for isdigit()	  */
  #include <errno.h>	/*  for global errno      */
