def find_static_library(library_name, library_path):
variants = ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]<EOL>if is_unix_like():<EOL><INDENT>extra_libdirs = ["<STR_LIT>", "<STR_LIT>",<EOL>"<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]<EOL><DEDENT>else:<EOL><INDENT>extra_libdirs = []<EOL><DEDENT>for path in extra_libdirs:<EOL><INDENT>if path not in library_path and os.path.isdir(path):<EOL><INDENT>library_path.append(path)<EOL><DEDENT><DEDENT>for path in library_path:<EOL><INDENT>for variant in variants:<EOL><INDENT>full_path = os.path.join(path, variant.format(library_name))<EOL>if os.path.isfile(full_path):<EOL><INDENT>return full_path<EOL><DEDENT><DEDENT><DEDENT>
Given the raw name of a library in `library_name`, tries to find a
    static library with this name in the given `library_path`. `library_path`
    is automatically extended with common library directories on Linux and Mac
    OS X.