id>dZddlZdZdZdZd dZdZdZd ZdS) zKThis module implements additional tests ala autoconf which can be useful. Nc|tjd}dD]$}||d|izdd}|r|cS%dS)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)inline __inline____inlinerN_check_compilertextwrapdedent try_compilecmdbodykwsts U/opt/cloudlinux/venv/lib/python3.11/site-packages/numpy/distutils/command/autodist.py check_inlinersv ?   D3 __TXrN2D$ ? ?  III  2c|tjd}dD]$}||d|izdd}|r|cS%dS)z.Return the restrict identifier (may be empty).zj static int static_func (char * %(restrict)s a) { return 0; } )restrict __restrict__ __restrictrNrrr s rcheck_restrictrsw ?   D9 __TZ$44dD A A  III  2rc|tjd}||ddS)zCheck if the compiler is GCC.z int main() { #if (! defined __GNUC__) #error gcc required #endif return 0; } Nr)rrs rcheck_compiler_gccr1sD ?  D ??4t , ,,rc|dt|t|t|g}tjd}||||d}|||zddS)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; } )versionmajorminor patchlevelN)r joinstrr r r )rrr r!rrrs rcheck_gcc_version_at_leastr$BshhE CJJJ@AAG ?  Duu" $ $B ??4"9dD 1 11rc|tjd||fz}||dddkS)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; } Nrr)r attributenamers rcheck_gcc_function_attributer(ZsV ?   4  !D ??4t , , 11rc|tjd||||fz}||dddkS)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)rr&r'codeincluders r,check_gcc_function_attribute_with_intrinsicsr,os\ ?  D$/ 0D ??4t , , 11rc|tjd|fz}||dddkS)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)rr&rs rcheck_gcc_variable_attributer.sS ?  } D ??4t , , 11r)rr) __doc__r rrrr$r(r,r.rrr1s.$---"22220222*222,22222r