]> granicus.if.org Git - python/commitdiff
If the readline library is found try and determine whether it's the broken
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 23 Feb 2006 15:02:23 +0000 (15:02 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 23 Feb 2006 15:02:23 +0000 (15:02 +0000)
MacOSX 10.4 readline, and don't build the readline module in that case.

setup.py

index 9eae12621dbc473f9cc26519970c09aac3a1e1b5..149b9403c4d5496f1676ce8b46609f5595e8c55a 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -447,7 +447,14 @@ class PyBuildExt(build_ext):
             exts.append( Extension('rgbimg', ['rgbimgmodule.c']) )
 
         # readline
-        if self.compiler.find_library_file(lib_dirs, 'readline'):
+        do_readline = self.compiler.find_library_file(lib_dirs, 'readline')
+        if platform == 'darwin':
+            # MacOSX 10.4 has a broken readline. Don't try to build
+            # the readline module unless the user has installed a fixed
+            # readline package
+            if not find_file('readline/rlconf.h', inc_dirs, []):
+                do_readline = False
+        if do_readline:
             readline_libs = ['readline']
             if self.compiler.find_library_file(lib_dirs,
                                                  'ncursesw'):