I noticed this check didn't make it into WAF -############################################ -# check if the compiler can handle negative enum values -# and don't truncate the values to INT_MAX -# a runtime test is needed here -AC_CACHE_CHECK([that the C compiler understands negative enum values],samba_cv_CC_NEGATIVE_ENUM_VALUES, [ - AC_TRY_RUN( -[ - #include <stdio.h> - enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF }; - int main(void) { - enum negative_values v1 = NEGATIVE_VALUE; - unsigned v2 = 0xFFFFFFFF; - if (v1 != v2) { - printf("v1=0x%08x v2=0x%08x\n", v1, v2); - return 1; - } - return 0; - } -], - samba_cv_CC_NEGATIVE_ENUM_VALUES=yes, - samba_cv_CC_NEGATIVE_ENUM_VALUES=no, - samba_cv_CC_NEGATIVE_ENUM_VALUES=yes)]) -if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then - AC_DEFINE(USE_UINT_ENUMS, 1, [Whether the compiler has uint enum support]) -fi - -AC_MSG_CHECKING([for test routines]) -AC_TRY_RUN([#include "${srcdir-.}/../tests/trivial.c"], - AC_MSG_RESULT(yes), - AC_MSG_ERROR([cant find test code. Aborting config]), - AC_MSG_WARN([cannot run when cross-compiling])) -