diff -uNr Python-2.3.2.orig/configure Python-2.3.2/configure --- Python-2.3.2.orig/configure 2003-09-27 10:58:55.000000000 +0200 +++ Python-2.3.2/configure 2003-11-05 13:06:49.000000000 +0100 @@ -1452,6 +1452,11 @@ # but used in struct sockaddr.sa_family. Reported by Tim Rice. SCO_SV/3.2) define_xopen_source=no;; + # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in + # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or + # has another value. By not (re)defining it, the defaults come in place. + AIX/4) + define_xopen_source=no;; esac if test $define_xopen_source = yes @@ -12965,7 +12970,12 @@ if test -z "$DYNLOADFILE" then case $ac_sys_system/$ac_sys_release in - AIX*) DYNLOADFILE="dynload_aix.o";; + AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c + if test "$ac_cv_func_dlopen" = yes + then DYNLOADFILE="dynload_shlib.o" + else DYNLOADFILE="dynload_aix.o" + fi + ;; BeOS*) DYNLOADFILE="dynload_beos.o";; hp*|HP*) DYNLOADFILE="dynload_hpux.o";; Darwin/*) DYNLOADFILE="dynload_next.o";; diff -uNr Python-2.3.2.orig/configure.in Python-2.3.2/configure.in --- Python-2.3.2.orig/configure.in 2003-09-25 17:21:00.000000000 +0200 +++ Python-2.3.2/configure.in 2003-11-05 13:06:02.000000000 +0100 @@ -150,6 +150,11 @@ # but used in struct sockaddr.sa_family. Reported by Tim Rice. SCO_SV/3.2) define_xopen_source=no;; + # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in + # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or + # has another value. By not (re)defining it, the defaults come in place. + AIX/4) + define_xopen_source=no;; esac if test $define_xopen_source = yes @@ -2017,7 +2022,12 @@ if test -z "$DYNLOADFILE" then case $ac_sys_system/$ac_sys_release in - AIX*) DYNLOADFILE="dynload_aix.o";; + AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c + if test "$ac_cv_func_dlopen" = yes + then DYNLOADFILE="dynload_shlib.o" + else DYNLOADFILE="dynload_aix.o" + fi + ;; BeOS*) DYNLOADFILE="dynload_beos.o";; hp*|HP*) DYNLOADFILE="dynload_hpux.o";; Darwin/*) DYNLOADFILE="dynload_next.o";;