From: Marc-André Lemburg Date: Fri, 26 Jan 2001 18:23:02 +0000 (+0000) Subject: Be extra careful with linking against libtermcap. This is now only done X-Git-Tag: v2.1a2~153 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2efc3238d749977364568422eb0acec37c2438ba;p=thirdparty%2FPython%2Fcpython.git Be extra careful with linking against libtermcap. This is now only done if we can find the libtermcap in the usual places. Some platforms don't have libtermcap, e.g. MacOSX. --- diff --git a/setup.py b/setup.py index e6bc676461e8..371036cb10a2 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).