Index: configure.in =================================================================== --- configure.in (révision 539) +++ configure.in (révision 693) @@ -564,7 +574,7 @@ exp_extra="\"\"" if test $ac_sys_release -ge 5 -o \ $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then - exp_extra="." + exp_extra=".." fi LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";; Monterey64*) @@ -628,6 +638,10 @@ if test $enable_shared = "yes"; then AC_DEFINE(Py_ENABLE_SHARED, 1, [Defined if Python is built as a shared library.]) case $ac_sys_system in + AIX*) + LDLIBRARY='libpython$(VERSION).so' + RUNSHARED=LIBPATH=`pwd`:${LIBPATH} + ;; BeOS*) LDLIBRARY='libpython$(VERSION).so' ;; @@ -1442,7 +1456,7 @@ then case $ac_sys_system/$ac_sys_release in AIX*) - BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" + BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp -L\$(srcdir)" LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp" ;; BeOS*) Index: Makefile.pre.in =================================================================== --- Makefile.pre.in (révision 539) +++ Makefile.pre.in (révision 693) @@ -367,10 +370,10 @@ libpython$(VERSION).so: $(LIBRARY_OBJS) if test $(INSTSONAME) != $(LDLIBRARY); then \ - $(LDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \ + $(BLDSHARED) -Wl,-h$(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) Index: Modules/ld_so_aix =================================================================== --- Modules/ld_so_aix (révision 539) +++ Modules/ld_so_aix (révision 693) @@ -131,11 +131,14 @@ shift done +if test "$objfile" = "libpython2.5.so"; then + ldsocoremode="true" +fi if test -z "$objs"; then echo "ld_so_aix: No input files; exiting." exit 2 -elif test ! -r "$impfile"; then +elif test ! -r "$impfile" -a -z "$ldsocoremode"; then echo "ld_so_aix: Import file '$impfile' not found or not readable; exiting." exit 2 fi @@ -166,11 +169,12 @@ #echo " -> object files: $objs" #echo " -> CC arguments: $args" -CCOPT="-Wl,-e$entry -Wl,-bE:$expfile -Wl,-bI:$impfile -Wl,-bhalt:4" -CCOPT="$CCOPT -Wl,-bM:SRE -Wl,-T512 -Wl,-H512 -lm -o $objfile" -# Note: to use dynamic libraries like libtcl8.4.so and libtk8.4.so -# you may need to replace the second CCOPT line above with the following: -# CCOPT="$CCOPT -Wl,-bM:SRE -Wl,-T512 -Wl,-H512 -brtl -bnortllib -lm -o $objfile" +if test -z "$ldsocoremode"; then + CCOPT="-Wl,-e$entry -Wl,-bE:$expfile -Wl,-bI:$impfile -Wl,-bhalt:4" +else + CCOPT="-Wl,-bnoentry -Wl,-bE:$expfile -Wl,-bhalt:4" +fi +CCOPT="$CCOPT -Wl,-bM:SRE -Wl,-T512 -Wl,-H512 -brtl -bnortllib -lm -o $objfile" CCARGS="$args"