docstr: Determine if function 'func' is available by constructing a
  source file that refers to 'func', and compiles and links it.
  If everything succeeds, returns true; otherwise returns false.
  
  The constructed source file starts out by including the header
  files listed in 'headers'.  If 'decl' is true, it then declares
  'func' (as "int func()"); you probably shouldn't supply 'headers'
  and set 'decl' true in the same call, or you might get errors about
  a conflicting declarations for 'func'.  Finally, the constructed
  'main()' function either references 'func' or (if 'call' is true)
  calls it.  'libraries' and 'library_dirs' are used when
  linking.
docstr_tok: ["Determine","if","function","'func","'","is","available","by","constructing","a","source","file","that","refers","to","'func","'",",","and","compiles","and","links","it",".","If","everything","succeeds",",","returns","true",";","otherwise","returns","false",".","The","constructed","source","file","starts","out","by","including","the","header","files","listed","in","'headers","'",".","If","'decl","'","is","true",",","it","then","declares","'func","'","(","as","``","int","func","(",")","''",")",";","you","probably","should","n't","supply","'headers'","and","set","'decl","'","true","in","the","same","call",",","or","you","might","get","errors","about","a","conflicting","declarations","for","'func","'",".","Finally",",","the","constructed","'main","(",")","'","function","either","references","'func","'","or","(","if","'call","'","is","true",")","calls","it",".","'libraries","'","and","'library_dirs","'","are","used","when","linking","."]
code: def check_func(
      self,
      func,
      headers=None,
      include_dirs=None,
      libraries=None,
      library_dirs=None,
      decl=0,
      call=0,
  ):
      """Determine if function 'func' is available by constructing a
      source file that refers to 'func', and compiles and links it.
      If everything succeeds, returns true; otherwise returns false.
  
      The constructed source file starts out by including the header
      files listed in 'headers'.  If 'decl' is true, it then declares
      'func' (as "int func()"); you probably shouldn't supply 'headers'
      and set 'decl' true in the same call, or you might get errors about
      a conflicting declarations for 'func'.  Finally, the constructed
      'main()' function either references 'func' or (if 'call' is true)
      calls it.  'libraries' and 'library_dirs' are used when
      linking.
      """
      self._check_compiler()
      body = []
      if decl:
          body.append("int %s ();" % func)
      body.append("int main () {")
      if call:
          body.append("  %s();" % func)
      else:
          body.append("  %s;" % func)
      body.append("}")
      body = "\n".join(body) + "\n"
  
      return self.try_link(
          body, headers, include_dirs, libraries, library_dirs
      )
  
imports: import os
  import re
  from ..core import Command
  from ..errors import DistutilsExecError
  from ..sysconfig import customize_compiler
  from distutils._log import log
label_desc: Use image node_id 15 for calling the config obj's underlying member method code with example usage: obj.check_func(func, headers, include_dirs, libraries, library_dirs, decl, call) and returns: self