B { `†ã@sJdZddlZdd„Zdd„Zdd„Zdd d „Zd d „Zd d„Zdd„ZdS)zKThis module implements additional tests ala autoconf which can be useful. éNcCsB| ¡t d¡}x*dD]"}| |d|idd¡}|r|SqWdS)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Ú)Ú_check_compilerÚtextwrapÚdedentÚ try_compile)ÚcmdÚbodyÚkwÚst©r úD/tmp/pip-unpacked-wheel-4iou4664/numpy/distutils/command/autodist.pyÚ check_inlines  rcCsB| ¡t d¡}x*dD]"}| |d|idd¡}|r|SqWdS)z.Return the restrict identifier (may be empty).zj static int static_func (char * %(restrict)s a) { return 0; } )ÚrestrictZ __restrict__Z __restrictrNr)rrrr)rr r r r r r Úcheck_restricts rcCs | ¡t d¡}| |dd¡S)zCheck if the compiler is GCC.zš int main() { #if (! defined __GNUC__) #error gcc required #endif return 0; } N)rrrr)rr r r r Úcheck_compiler_gcc1s rcCsN| ¡d t|ƒt|ƒt|ƒg¡}t d¡}||||dœ}| ||dd¡S)zB Check that the gcc version is at least the specified version.Ú.a1 int main() { #if (! defined __GNUC__) || (__GNUC__ < %(major)d) || \ (__GNUC_MINOR__ < %(minor)d) || \ (__GNUC_PATCHLEVEL__ < %(patchlevel)d) #error gcc >= %(version)s required #endif return 0; } )ÚversionÚmajorÚminorÚ patchlevelN)rÚjoinÚstrrrr)rrrrrr r r r r Úcheck_gcc_version_at_leastBs rcCs,| ¡t d¡||f}| |dd¡dkS)z9Return True if the given function attribute is supported.a #pragma GCC diagnostic error "-Wattributes" #pragma clang diagnostic error "-Wattributes" int %s %s(void* unused) { return 0; } int main() { return 0; } Nr)rrrr)rÚ attributeÚnamer r r r Úcheck_gcc_function_attributeZsrcCs0| ¡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; } Nr)rrrr)rrrÚcodeÚincluder r r r Ú,check_gcc_function_attribute_with_intrinsicsos 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; } Nr)rrrr)rrr r r r Úcheck_gcc_variable_attribute…s r )rr) Ú__doc__rrrrrrrr r r r r Ús