def _which_unix_compiler(compiler):
    """
    Find which Unix compiler is "cc", "c++".

    Default to GCC if no other found.

    Parameters
    ----------
    compiler : str
        Compiler Name

    Returns
    -------
    str:
        Detected compiler Name
    """
    from subprocess import Popen, PIPE
    try:
        version_str = Popen([compiler if compiler != 'unix' else 'cc',
            '--version'], stdout=PIPE, universal_newlines=True).stdout.read(
            ).lower()
    except OSError:
        return 'gcc'
    if 'clang' in version_str:
        return 'llvm'
    return 'gcc'
