def METHOD_NAME(env, required = False, parallel = False, fortran = False, **kw):
    if env.GetOption('help') or env.GetOption('clean'):
        return
    conf = env.Configure(custom_tests = {'CheckProg': utils.checks.CheckProg,
                                         'CheckLibWithHeader': utils.checks.CheckLibWithHeader,
                                         'CheckHDF5FortranInclude' : CheckHDF5FortranInclude,
                                         'CheckV18API' : CheckV18API})
    # Find h5cc or h5pcc
    h5ccs = ['h5cc', 'h5pcc']
    if parallel:
        h5ccs[0], h5ccs[1] = h5ccs[1], h5ccs[0]
    for h5cc in h5ccs:
        h5cc = conf.CheckProg(h5cc)
        if h5cc:
            break
    if h5cc:
        # Parse the output from the h5cc compiler wrapper
        def parse_func(env, cmd):
            # remove the compiler
            cmd = cmd.partition(' ')[2]
            # remove unknown arguments
            cmd = utils.compiler.removeUnknownOptions(cmd)
            return env.ParseFlags(cmd)
        flags = env.ParseConfig([h5cc, '-show', '-shlib'], parse_func)
        if flags['LIBS']==[] or flags['LIBPATH']==[]:
           h5cc=None
    if not h5cc:
        # Try pkg-config
        hdf5s = ['hdf5_hl', 'hdf5_hl_parallel']
        if parallel:
            hdf5s[0], hdf5s[1] = hdf5s[1], hdf5s[0]
        for hdf5 in hdf5s:
            flags = utils.pkgconfig.parse(conf, hdf5)
            if flags:
       	        break
        if not flags:
            if required:
                print('Could not find h5cc or h5pcc. Make sure the path to the HDF5 library is correct!')
                env.Exit(1)
            else:
                conf.Finish()
                return
    # Add the lib path
    env.AppendUnique(LIBPATH=flags['LIBPATH'])
    if fortran:
        # Fortran module file
        ret = conf.CheckHDF5FortranInclude()
        if not ret:
            if required:
                print('Could not find HDF5 for Fortran!')
                env.Exit(1)
            else:
                conf.Finish()
                return
        # Fortran library
        ret = conf.CheckLib('hdf5_fortran')
        if not ret:
            if required:
                print('Could not find HDF5 for Fortran!')
                env.Exit(1)
            else:
                conf.Finish()
                return
    ret = conf.CheckLibWithHeader(flags['LIBS'][0], 'hdf5.h', 'c', extra_libs=flags['LIBS'][1:])
    if not ret:
        if required:
            print('Could not find the HDF5 library!')
            env.Exit(1)
        else:
            conf.Finish()
            return
    # Check API Mapping
    if not conf.CheckV18API(h5cc):
        # TODO We might need to extent this list
        conf.env.Append(CPPDEFINES=['H5Dcreate_vers=2',
                                    'H5Dopen_vers=2',
                                    'H5Gcreate_vers=2',
                                    'H5Gopen_vers=2',
                                    'H5Acreate_vers=2',
                                    'H5Eget_auto_vers=2',
                                    'H5Eset_auto_vers=2'])
    conf.Finish()