Commits

Anonymous committed ca90b7f

For ncurses, use libncurses if it exists.

Comments (0)

Files changed (1)

pypy/module/_minimal_curses/fficurses.py

 
 _CYGWIN = platform == 'cygwin'
 _NCURSES_CURSES = os.path.isfile("/usr/include/ncurses/curses.h") 
+_LIBNCURSES = os.path.isfile("/usr/lib/libncurses.a") 
 
 if _CYGWIN or _NCURSES_CURSES:
     eci = ExternalCompilationInfo(
 else:
     eci = ExternalCompilationInfo(
         includes = ['curses.h', 'term.h'],
-        libraries = ['curses'],
+        libraries = ['ncurses' if _LIBNCURSES else 'curses'],
     )
 
 rffi_platform.verify_eci(eci)