Add OpenMP compilation flags, if supported (if not a warning will be
    printed to the console and no flags will be added.)

    Returns `True` if the flags were added, `False` otherwise.
164666
def add_openmp_flags_if_available(extension):
    

    if _ASTROPY_DISABLE_SETUP_WITH_OPENMP_:
        log.info("OpenMP support has been explicitly disabled.")
        return False

    openmp_flags = get_openmp_flags()
    using_openmp = check_openmp_support(openmp_flags=openmp_flags)

    if using_openmp:
        compile_flags = openmp_flags.get('compiler_flags')
        link_flags = openmp_flags.get('linker_flags')
        log.info("Compiling Cython/C/C++ extension with OpenMP support")
        extension.extra_compile_args.extend(compile_flags)
        extension.extra_link_args.extend(link_flags)
    else:
        log.warn("Cannot compile Cython/C/C++ extension with OpenMP, reverting "
                 "to non-parallel code")

    return using_openmp
179365
def compile_flags(args):
    

    compiler_options = {
        'define_macros': args.defines,
        'undef_macros': args.undefs,
        'include_dirs': args.include_dirs,
        'extra_compile_args': args.extra_flags,
        'library_dirs': args.libraries_dir,
        'extra_link_args': args.extra_flags,
    }
    for param in ('opts', ):
        val = getattr(args, param, None)
        if val:
            compiler_options[param] = val

    return compiler_options
492301
def _checkBuildDependencies():
    compiler = distutils.ccompiler.new_compiler()
    
    if not compiler.has_function('rand', includes=['stdlib.h']):
        print("It seems like C compiler is not installed or not operable.")
        return False

    if not compiler.has_function('rand',
                                 includes=['stdlib.h', 'Python.h'],
                                 include_dirs=[distutils.sysconfig.get_python_inc()],
                                 library_dirs=[os.path.join(os.path.dirname(sys.executable), 'libs')]):
        print("Failed to find Python headers.")
        print("Try to install python-dev package")
        print("If not standard directories are used, pass parameters")
        print("\tpython setup.py install --lib-dir=c://github/pcre-8.37/build/Release --include-dir=c://github/pcre-8.37/build")
        print("\tpython setup.py install --lib-dir=/my/local/lib --include-dir=/my/local/include")
        print("--lib-dir= and --include-dir= may be used multiple times")
        return False

    if not compiler.has_function('pcre_version',
                                 includes=['pcre.h'],
                                 libraries=['pcre'],
                                 include_dirs=include_dirs,
                                 library_dirs=library_dirs):
        print("Failed to find pcre library.")
        print("Try to install libpcre{version}-dev package, or go to http://pcre.org")
        print("If not standard directories are used, pass parameters:")
        print("\tpython setup.py install --lib-dir=c://github/pcre-8.37/build/Release --include-dir=c://github/pcre-8.37/build")
        print("\tpython setup.py install --lib-dir=/my/local/lib --include-dir=/my/local/include")
        print("--lib-dir= and --include-dir= may be used multiple times")
        return False

    return True
1016435
def check_blas_config():
    
    # don't warn repeatedly
    global _checked_blas_config
    if _checked_blas_config:
        return
    _checked_blas_config = True

    if np.__config__.get_info('openblas_info') and os.environ.get('OPENBLAS_NUM_THREADS') != '1':
        logging.warning("OpenBLAS detected. Its highly recommend to set the environment variable "
                        "'export OPENBLAS_NUM_THREADS=1' to disable its internal multithreading")
    if np.__config__.get_info('blas_mkl_info') and os.environ.get('MKL_NUM_THREADS') != '1':
        logging.warning("Intel MKL BLAS detected. Its highly recommend to set the environment "
                        "variable 'export MKL_NUM_THREADS=1' to disable its internal "
                        "multithreading")
1324698
def platform_flags_fixup(libs)
      libs[:all].each do |lib|
        ps = tc.platform_settings_for(lib)
        unless ps.empty?
          @settings['ADD_CFLAGS'] += " #{ps[:CFLAGS]}" if ps[:CFLAGS]
          @settings['ADD_CXXFLAGS'] += " #{ps[:CXXFLAGS]}" if ps[:CXXFLAGS]

          # remove all -lXX settings from ps[:LDFLAGS] and use rest for @settings['ADD_LDFLAGS'],
          # -lXX is set in Toolchain#linker_line_for
          @settings['ADD_LDFLAGS'] += ps[:LDFLAGS].gsub(/(\s|^)+-l\S+/, '') if ps[:LDFLAGS]
        end
      end
    end
917861
private function compile() : void
    {
        $this->isCompiled = true;

        if ($this->type === self::TYPE_SIMPLE) {
            $this->compileSimpleTable();
        } else {
            $this->compilePrettyTable();
        }
    }
514721
protected static function checkSupports()
    {
        if (is_callable('runkit_lint_file')) {
            self::$support[self::SUPPORT_RUNKIT_SANDBOX] = true;
        }

        if (is_callable('runkit_function_add')) {
            self::$support[self::SUPPORT_RUNKIT_MODIFY] = true;
        }

        if (is_callable('runkit_import')) {
            self::$support[self::SUPPORT_RUNKIT_IMPORT] = true;
        }

        if (self::supported(self::SUPPORT_RUNKIT_MODIFY) && ini_get('runkit.internal_override')) {
            self::$support[self::SUPPORT_RUNKIT_INTERNAL_MODIFY] = true;
        }
    }
1021488
def update_flags(self, idlist, flags):
        
        return self.update_bugs(idlist, self.build_update(flags=flags))
384458
public static function canCompile()
    {
        if (!Phar::canWrite()) {
            throw new PharException(
                'Unable to compile a phar because of php\'s security settings. '
                . 'phar.readonly must be disabled in php.ini. ' . PHP_EOL . PHP_EOL
                . 'You will need to edit ' . php_ini_loaded_file() . ' and add or set'
                . PHP_EOL . PHP_EOL . "    phar.readonly = Off" . PHP_EOL . PHP_EOL
                . 'to continue. Details here: http://php.net/manual/en/phar.configuration.php');
        }
    }
4358
public void enableMmapIfSupported() {
		if (validState) {
			throw new InvalidStateException();
		}
		useMmap = Check64bitsJVM.JVMis64bits();
		if (useMmap) {
			log.info("Enabled mmap on 64bits JVM");
		} else {
			log.info("Disabled mmap on 32bits JVM");
		}
	}
1023107
def is_changed_uses(cp):
    '''
    
    '''
    cpv = _get_cpv(cp)
    i_flags, conf_flags = get_cleared_flags(cpv)
    for i in i_flags:
        try:
            conf_flags.remove(i)
        except ValueError:
            return True
    return True if conf_flags else False
1004835
def add_flag(self, flag):
        
        super(Entry, self).add_flag(flag)
        self._changed_attrs.add('flags')
1283105
Set<OpensFlag> readOpensFlags(int flags) {
        Set<OpensFlag> set = EnumSet.noneOf(OpensFlag.class);
        for (OpensFlag f: OpensFlag.values()) {
            if ((flags & f.value) != 0)
                set.add(f);
        }
        return set;
    }
1141399
def get_compiler_flags(self):
        
        flags = 0

        for value in self.get_globals().values():
            if isinstance(value, __future__._Feature):
                flags |= value.compiler_flag

        return flags
531541
def _merge_flags(new_flags, old_flags=None, conf='any'):
    '''
    
    '''
    if not old_flags:
        old_flags = []
    args = [old_flags, new_flags]
    if conf == 'accept_keywords':
        tmp = new_flags + \
            [i for i in old_flags if _check_accept_keywords(new_flags, i)]
    else:
        tmp = portage.flatten(args)
    flags = {}
    for flag in tmp:
        if flag[0] == '-':
            flags[flag[1:]] = False
        else:
            flags[flag] = True
    tmp = []
    for key, val in six.iteritems(flags):
        if val:
            tmp.append(key)
        else:
            tmp.append('-' + key)

    # Next sort is just aesthetic, can be commented for a small performance
    # boost
    tmp.sort(key=lambda x: x.lstrip('-'))
    return tmp
317344
def has_flag(compiler, flagname):
    
    with tempfile.NamedTemporaryFile("w", suffix=".cpp") as f:
        f.write("int main (int argc, char **argv) { return 0; }")
        try:
            compiler.compile([f.name], extra_postargs=[flagname])
        except setuptools.distutils.errors.CompileError:
            return False
    return True
15240
public static function supports_colour()
    {
        // Special case for buildbot
        if (isset($_ENV['_']) && strpos($_ENV['_'], 'buildbot') !== false) {
            return false;
        }

        if (!defined('STDOUT')) {
            define('STDOUT', fopen("php://stdout", "w"));
        }
        return function_exists('posix_isatty') ? @posix_isatty(STDOUT) : false;
    }