MS_WINDOWS = (HOST_PLATFORM == 'win32')
CYGWIN = (HOST_PLATFORM == 'cygwin')
MACOS = (HOST_PLATFORM == 'darwin')
+AIX = (HOST_PLATFORM.startswith('aix'))
VXWORKS = ('vxworks' in HOST_PLATFORM)
if (self.config_h_vars.get('HAVE_GETSPNAM', False) or
self.config_h_vars.get('HAVE_GETSPENT', False)):
self.add(Extension('spwd', ['spwdmodule.c']))
- else:
+ # AIX has shadow passwords, but access is not via getspent(), etc.
+ # module support is not expected so it not 'missing'
+ elif not AIX:
self.missing.append('spwd')
# select(2); not on ancient System V
curses_library = readline_termcap_library
elif self.compiler.find_library_file(self.lib_dirs, 'ncursesw'):
curses_library = 'ncursesw'
+ # Issue 36210: OSS provided ncurses does not link on AIX
+ # Use IBM supplied 'curses' for successful build of _curses
+ elif AIX and self.compiler.find_library_file(self.lib_dirs, 'curses'):
+ curses_library = 'curses'
elif self.compiler.find_library_file(self.lib_dirs, 'ncurses'):
curses_library = 'ncurses'
elif self.compiler.find_library_file(self.lib_dirs, 'curses'):
self.missing.append('_curses')
# If the curses module is enabled, check for the panel module
- if (curses_enabled and
- self.compiler.find_library_file(self.lib_dirs, panel_library)):
+ # _curses_panel needs some form of ncurses
+ skip_curses_panel = True if AIX else False
+ if (curses_enabled and not skip_curses_panel and
+ self.compiler.find_library_file(self.lib_dirs, panel_library)):
self.add(Extension('_curses_panel', ['_curses_panel.c'],
- include_dirs=curses_includes,
- define_macros=curses_defines,
- libraries=[panel_library, *curses_libs]))
- else:
+ include_dirs=curses_includes,
+ define_macros=curses_defines,
+ libraries=[panel_library, *curses_libs]))
+ elif not skip_curses_panel:
self.missing.append('_curses_panel')
def detect_crypt(self):
# Platform-specific libraries
if HOST_PLATFORM.startswith(('linux', 'freebsd', 'gnukfreebsd')):
self.add(Extension('ossaudiodev', ['ossaudiodev.c']))
- else:
+ elif not AIX:
self.missing.append('ossaudiodev')
if MACOS: