def METHOD_NAME(name):
    """
    Returns the shared library filename for a given library.
    The library name is given without any prefixes or suffixes--(e.g.
    just "Singular", not "libSingular", as shared library naming is
    platform-specific.
    This does ''not'' currently return the absolute path of the file on most
    platforms; see https://bugs.python.org/issue21042
    EXAMPLES::
        sage: from sage.misc.compat import find_library
        sage: find_library('giac')                                                      # needs sage.libs.giac
        '...giac...'
    """
    result = _find_library(name)
    if result:
        return result
    # if no result found, check DYLD_LIBRARY_PATH
    LDPATH_STR = os.environ.get('DYLD_LIBRARY_PATH')
    lib_dirs = (LDPATH_STR.split(':') if LDPATH_STR else []) + [os.path.join(SAGE_LOCAL, 'lib')]
    for libdir in lib_dirs:
        for libext in ['so', 'a']:
            implib = os.path.join(libdir,
                                  'lib{0}.{1}'.format(name, libext))
            if os.path.exists(implib):
                return implib