code: def find_library_file(libname):
      
      # Use a dummy argument parser to get user specified library dirs
      parser = argparse.ArgumentParser(add_help=False)
      parser.add_argument("--library-dirs", "-L", default='')
      args, unknown = parser.parse_known_args()
      user_lib_dirs = args.library_dirs.split(':')
      # Append default search path (not a complete list)
      lib_dirs = user_lib_dirs + [os.path.join(sys.prefix, 'lib'),
                                '/usr/local/lib',
                                '/usr/lib',
                                '/usr/lib/x86_64-linux-gnu']
  
      compiler = ccompiler.new_compiler()
      return compiler.find_library_file(lib_dirs, libname)
docs: Try to get the directory of the specified library.
      It adds to the search path the library paths given to distutil's build_ext.