summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index e6bc676..371036c 100644
--- a/setup.py
+++ b/setup.py
@@ -242,10 +242,15 @@ class PyBuildExt(build_ext):
exts.append( Extension('rgbimg', ['rgbimgmodule.c']) )
# readline
- if (self.compiler.find_library_file(lib_dirs, 'readline')):
+ if self.compiler.find_library_file(lib_dirs, 'readline'):
+ readline_libs = ['readline']
+ if self.compiler.find_library_file(lib_dirs +
+ ['/usr/lib/termcap'],
+ 'termcap'):
+ readline_libs.append('termcap')
exts.append( Extension('readline', ['readline.c'],
library_dirs=['/usr/lib/termcap'],
- libraries=['readline', 'termcap']) )
+ libraries=readline_libs) )
# The crypt module is now disabled by default because it breaks builds
# on many systems (where -lcrypt is needed), e.g. Linux (I believe).