Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0b27ff9

Browse files
committed
SF patch #712367, get build working on AIX
configure change is necessary to pass "." to makexp_aix so that dynamic modules work setup change gets curses working
1 parent aca44e2 commit 0b27ff9

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

configure

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3176,7 +3176,12 @@ then
31763176
fi
31773177
case $ac_sys_system in
31783178
AIX*)
3179-
LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
3179+
exp_extra="\"\""
3180+
if test $ac_sys_release -ge 5 -o \
3181+
$ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3182+
exp_extra="."
3183+
fi
3184+
LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
31803185
dgux*)
31813186
LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
31823187
Monterey64*)

configure.in

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,12 @@ then
421421
fi
422422
case $ac_sys_system in
423423
AIX*)
424-
LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
424+
exp_extra="\"\""
425+
if test $ac_sys_release -ge 5 -o \
426+
$ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
427+
exp_extra="."
428+
fi
429+
LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
425430
dgux*)
426431
LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
427432
Monterey64*)

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ def detect_modules(self):
413413
if self.compiler.find_library_file(lib_dirs,
414414
'ncurses'):
415415
readline_libs.append('ncurses')
416+
elif self.compiler.find_library_file(lib_dirs, 'curses'):
417+
readline_libs.append('curses')
416418
elif self.compiler.find_library_file(lib_dirs +
417419
['/usr/lib/termcap'],
418420
'termcap'):
@@ -654,8 +656,10 @@ class found(Exception): pass
654656
# the _curses module.
655657
if (self.compiler.find_library_file(lib_dirs, 'terminfo')):
656658
curses_libs = ['curses', 'terminfo']
657-
else:
659+
elif (self.compiler.find_library_file(lib_dirs, 'termcap')):
658660
curses_libs = ['curses', 'termcap']
661+
else:
662+
curses_libs = ['curses']
659663

660664
exts.append( Extension('_curses', ['_cursesmodule.c'],
661665
libraries = curses_libs) )

0 commit comments

Comments
 (0)