U ã€C^á ã@sTdZddlmZmZmZddlZdd„Zdd„Zdd „Zd d „Z d d „Z dd„Z dS)zKThis module implements additional tests ala autoconf which can be useful. é)ÚdivisionÚabsolute_importÚprint_functionNcCsB| ¡t d¡}dD]&}| |d|idd¡}|r|SqdS)z,Return the inline identifier (may be empty).zÜ #ifndef __cplusplus static %(inline)s int static_func (void) { return 0; } %(inline)s int nostatic_func (void) { return 0; } #endif)ÚinlineZ __inline__Z__inlinerNÚ©Z_check_compilerÚtextwrapÚdedentZ try_compile©ÚcmdÚbodyÚkwÚst©rúC/tmp/pip-install-6_kvzl1k/numpy/numpy/distutils/command/autodist.pyÚ check_inline s  rcCsB| ¡t d¡}dD]&}| |d|idd¡}|r|SqdS)z.Return the restrict identifier (may be empty).zj static int static_func (char * %(restrict)s a) { return 0; } )ÚrestrictZ __restrict__Z __restrictrNrrr rrrÚcheck_restrict!s  rcCs | ¡t d¡}| |dd¡S)z)Return True if the C compiler is GCC 4.x.z± int main() { #if (! defined __GNUC__) || (__GNUC__ < 4) #error gcc >= 4 required #endif return 0; } Nr)r r rrrÚcheck_compiler_gcc43s rcCs,| ¡t d¡||f}| |dd¡dkS)z9Return True if the given function attribute is supported.zÔ #pragma GCC diagnostic error "-Wattributes" #pragma clang diagnostic error "-Wattributes" int %s %s(void*); int main() { return 0; } Nrr)r Ú attributeÚnamer rrrÚcheck_gcc_function_attributeCs  õ rcCs0| ¡t d¡||||f}| |dd¡dkS)zMReturn True if the given function attribute is supported with intrinsics.z¶ #include<%s> int %s %s(void) { %s; return 0; } int main() { return 0; } Nrr)r rrÚcodeÚincluder rrrÚ,check_gcc_function_attribute_with_intrinsicsUs  órcCs*| ¡t d¡|f}| |dd¡dkS)z9Return True if the given variable attribute is supported.zÎ #pragma GCC diagnostic error "-Wattributes" #pragma clang diagnostic error "-Wattributes" int %s foo; int main() { return 0; } Nrr)r rr rrrÚcheck_gcc_variable_attributeks  õ r) Ú__doc__Ú __future__rrrrrrrrrrrrrrÚs