]> granicus.if.org Git - python/commitdiff
SF patch #712367, get build working on AIX
authorNeal Norwitz <nnorwitz@gmail.com>
Mon, 31 Mar 2003 15:53:49 +0000 (15:53 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Mon, 31 Mar 2003 15:53:49 +0000 (15:53 +0000)
configure change is necessary to pass "." to makexp_aix so that
dynamic modules work

setup change gets curses working

configure
configure.in
setup.py

index a7c4a9d421a723883825c1a5a3581ce7c4bff0b6..24d60e8ffc1555605a9a7655e2f9a027866cb519 100755 (executable)
--- 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*)
index 5f455c127b59c0b3b957140663fb273fe50ddeba..34c7238c22b65819453ef0109ed762f57cbcee39 100644 (file)
@@ -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*)
index c611bf2549e92294e753e7aec500a218846f587a..730e00c4c6ed16f0a6706c942daa7ae4257d2a66 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -413,6 +413,8 @@ class PyBuildExt(build_ext):
             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 PyBuildExt(build_ext):
                 # 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) )