[Distutils] Patch to config::check_lib()

Bastian Kleineidam calvin@cs.uni-sb.de
Tue Oct 10 06:07:03 2000


Hi,

this is a patch to make check_lib more like AC_CHECK_LIB. Sometimes you
need additional libraries to compile programs.

Bastian

diff -BurN --exclude=*.pyc distutils/distutils/command/config.py distutils.patched/distutils/command/config.py
--- distutils/distutils/command/config.py	Mon Oct  9 23:28:37 2000
+++ distutils.patched/distutils/command/config.py	Tue Oct 10 11:07:17 2000
@@ -310,7 +310,7 @@
     # check_func ()
 
     def check_lib (self, library, library_dirs=None,
-                   headers=None, include_dirs=None):
+                   headers=None, include_dirs=None, other_libraries=[]):
         """Determine if 'library' is available to be linked against,
         without actually checking that any particular symbols are provided
         by it.  'headers' will be used in constructing the source file to
@@ -319,7 +319,8 @@
         """
         self._check_compiler()
         return self.try_link("int main (void) { }",
-                             headers, include_dirs, [library], library_dirs)
+                             headers, include_dirs,
+			     [library]+other_libraries, library_dirs)
 
     def check_header (self, header, include_dirs=None,
                       library_dirs=None, lang="c"):