diff --git a/configure b/configure index a7c4a9d421a..24d60e8ffc1 100755 --- a/configure +++ b/configure @@ -3176,7 +3176,12 @@ then fi case $ac_sys_system in AIX*) - LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";; + exp_extra="\"\"" + if test $ac_sys_release -ge 5 -o \ + $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then + exp_extra="." + fi + LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";; dgux*) LINKCC="LD_RUN_PATH=$libdir $LINKCC";; Monterey64*) diff --git a/configure.in b/configure.in index 5f455c127b5..34c7238c22b 100644 --- a/configure.in +++ b/configure.in @@ -421,7 +421,12 @@ then fi case $ac_sys_system in AIX*) - LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";; + exp_extra="\"\"" + if test $ac_sys_release -ge 5 -o \ + $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then + exp_extra="." + fi + LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";; dgux*) LINKCC="LD_RUN_PATH=$libdir $LINKCC";; Monterey64*) diff --git a/setup.py b/setup.py index c611bf2549e..730e00c4c6e 100644 --- a/setup.py +++ b/setup.py @@ -413,6 +413,8 @@ def detect_modules(self): if self.compiler.find_library_file(lib_dirs, 'ncurses'): readline_libs.append('ncurses') + elif self.compiler.find_library_file(lib_dirs, 'curses'): + readline_libs.append('curses') elif self.compiler.find_library_file(lib_dirs + ['/usr/lib/termcap'], 'termcap'): @@ -654,8 +656,10 @@ class found(Exception): pass # the _curses module. if (self.compiler.find_library_file(lib_dirs, 'terminfo')): curses_libs = ['curses', 'terminfo'] - else: + elif (self.compiler.find_library_file(lib_dirs, 'termcap')): curses_libs = ['curses', 'termcap'] + else: + curses_libs = ['curses'] exts.append( Extension('_curses', ['_cursesmodule.c'], libraries = curses_libs) )