class_docstr: Abstract base class to define the interface that must be implemented
  by real compiler classes.  Also has some utility methods used by
  several compiler classes.
  
  The basic idea behind a compiler abstraction class is that each
  instance can be used for all the compile/link steps in building a
  single project.  Thus, attributes common to all of those compile and
  link steps -- include directories, macros to define, libraries to link
  against, etc. -- are attributes of the compiler instance.  To allow for
  variability in how individual files are treated, most of those
  attributes may be varied on a per-compilation or per-link basis.
class_docstr_tok: ["Abstract","base","class","to","define","the","interface","that","must","be","implemented","by","real","compiler","classes",".","Also","has","some","utility","methods","used","by","several","compiler","classes",".","The","basic","idea","behind","a","compiler","abstraction","class","is","that","each","instance","can","be","used","for","all","the","compile\/link","steps","in","building","a","single","project",".","Thus",",","attributes","common","to","all","of","those","compile","and","link","steps","--","include","directories",",","macros","to","define",",","libraries","to","link","against",",","etc",".","--","are","attributes","of","the","compiler","instance",".","To","allow","for","variability","in","how","individual","files","are","treated",",","most","of","those","attributes","may","be","varied","on","a","per-compilation","or","per-link","basis","."]
docstr: Return a boolean indicating whether funcname is provided as
  a symbol on the current platform.  The optional arguments can
  be used to augment the compilation environment.
  
  The libraries argument is a list of flags to be passed to the
  linker to make additional symbol definitions available for
  linking.
  
  The includes and include_dirs arguments are deprecated.
  Usually, supplying include files with function declarations
  will cause function detection to fail even in cases where the
  symbol is available for linking.
docstr_tok: ["Return","a","boolean","indicating","whether","funcname","is","provided","as","a","symbol","on","the","current","platform",".","The","optional","arguments","can","be","used","to","augment","the","compilation","environment",".","The","libraries","argument","is","a","list","of","flags","to","be","passed","to","the","linker","to","make","additional","symbol","definitions","available","for","linking",".","The","includes","and","include_dirs","arguments","are","deprecated",".","Usually",",","supplying","include","files","with","function","declarations","will","cause","function","detection","to","fail","even","in","cases","where","the","symbol","is","available","for","linking","."]
code: def has_function(  # noqa: C901
      self,
      funcname,
      includes=None,
      include_dirs=None,
      libraries=None,
      library_dirs=None,
  ):
      """Return a boolean indicating whether funcname is provided as
      a symbol on the current platform.  The optional arguments can
      be used to augment the compilation environment.
  
      The libraries argument is a list of flags to be passed to the
      linker to make additional symbol definitions available for
      linking.
  
      The includes and include_dirs arguments are deprecated.
      Usually, supplying include files with function declarations
      will cause function detection to fail even in cases where the
      symbol is available for linking.
  
      """
      # this can't be included at module scope because it tries to
      # import math which might not be available at that point - maybe
      # the necessary logic should just be inlined?
      import tempfile
  
      if includes is None:
          includes = []
      else:
          warnings.warn("includes is deprecated", DeprecationWarning)
      if include_dirs is None:
          include_dirs = []
      else:
          warnings.warn(
              "include_dirs is deprecated", DeprecationWarning
          )
      if libraries is None:
          libraries = []
      if library_dirs is None:
          library_dirs = []
      fd, fname = tempfile.mkstemp(".c", funcname, text=True)
      f = os.fdopen(fd, "w")
      try:
          for incl in includes:
              f.write("""#include "%s"\n""" % incl)
          if not includes:
              # Use "char func(void);" as the prototype to follow
              # what autoconf does.  This prototype does not match
              # any well-known function the compiler might recognize
              # as a builtin, so this ends up as a true link test.
              # Without a fake prototype, the test would need to
              # know the exact argument types, and the has_function
              # interface does not provide that level of information.
              f.write(
                  """\
  #ifdef __cplusplus
  extern "C"
  #endif
  char %s(void);
  """
                  % funcname
              )
          f.write(
              """\
  int main (int argc, char **argv) {
      %s();
      return 0;
  }
  """
              % funcname
          )
      finally:
          f.close()
      try:
          objects = self.compile([fname], include_dirs=include_dirs)
      except CompileError:
          return False
      finally:
          os.remove(fname)
  
      try:
          self.link_executable(
              objects,
              "a.out",
              libraries=libraries,
              library_dirs=library_dirs,
          )
      except (LinkError, TypeError):
          return False
      else:
          os.remove(
              self.executable_filename(
                  "a.out", output_dir=self.output_dir or ""
              )
          )
      finally:
          for fn in objects:
              os.remove(fn)
      return True
  
imports: import sys
  import os
  import re
  import warnings
  from .errors import CompileError, LinkError, UnknownFileError, DistutilsPlatformError, DistutilsModuleError
  from .spawn import spawn
  from .file_util import move_file
  from .dir_util import mkpath
  from ._modified import newer_group
  from .util import split_quoted, execute
  from ._log import log
label_desc: Use image node_id 37 for calling the CCompiler obj's underlying member method code with example usage: obj.has_function(funcname, includes, include_dirs, libraries, library_dirs) and returns: True, False, False