+##########################################
+# cuda probe
+if test "$cuda" != "yes" ; then
+ cuda="no"
+fi
+cat > $TMPC << EOF
+#include <cuda.h>
+int main(int argc, char **argv)
+{
+ return cuInit(0);
+}
+EOF
+if test "$enable_cuda" = "yes" && compile_prog "" "-lcuda" "cuda"; then
+ cuda="yes"
+ LIBS="-lcuda $LIBS"
+fi
+print_config "cuda" "$cuda"
+
+##########################################
+# check for cc -march=native
+build_native="no"
+cat > $TMPC << EOF
+int main(int argc, char **argv)
+{
+ return 0;
+}
+EOF
+if test "$disable_native" = "no" && test "$disable_opt" != "yes" && \
+ compile_prog "-march=native" "" "march=native"; then
+ build_native="yes"
+fi
+print_config "Build march=native" "$build_native"
+
+##########################################
+# check for -lcunit
+if test "$cunit" != "yes" ; then
+ cunit="no"
+fi
+cat > $TMPC << EOF
+#include <CUnit/CUnit.h>
+#include <CUnit/Basic.h>
+int main(void)
+{
+ if (CU_initialize_registry() != CUE_SUCCESS)
+ return CU_get_error();
+ CU_basic_set_mode(CU_BRM_VERBOSE);
+ CU_basic_run_tests();
+ CU_cleanup_registry();
+ return CU_get_error();
+}
+EOF
+if compile_prog "" "-lcunit" "CUnit"; then
+ cunit="yes"
+fi
+print_config "CUnit" "$cunit"
+
+##########################################
+# check for __kernel_rwf_t
+__kernel_rwf_t="no"
+cat > $TMPC << EOF
+#include <linux/fs.h>
+int main(int argc, char **argv)
+{
+ __kernel_rwf_t x;
+ x = 0;
+ return x;
+}
+EOF
+if compile_prog "" "" "__kernel_rwf_t"; then
+ __kernel_rwf_t="yes"
+fi
+print_config "__kernel_rwf_t" "$__kernel_rwf_t"
+
+##########################################
+# check if gcc has -Wimplicit-fallthrough
+fallthrough="no"
+cat > $TMPC << EOF
+int main(int argc, char **argv)
+{
+ return 0;
+}
+EOF
+if compile_prog "-Wimplicit-fallthrough" "" "-Wimplicit-fallthrough"; then
+ fallthrough="yes"
+fi
+print_config "-Wimplicit-fallthrough" "$fallthrough"
+
+##########################################
+# check for MADV_HUGEPAGE support
+if test "$thp" != "yes" ; then
+ thp="no"
+fi
+if test "$esx" != "yes" ; then
+ cat > $TMPC <<EOF
+#include <sys/mman.h>
+int main(void)
+{
+ return madvise(0, 0x1000, MADV_HUGEPAGE);
+}
+EOF
+ if compile_prog "" "" "thp" ; then
+ thp=yes
+ else
+ if test "$thp" = "yes" ; then
+ feature_not_found "Transparent Huge Page" ""
+ fi
+ thp=no
+ fi
+fi
+print_config "MADV_HUGEPAGE" "$thp"
+
+##########################################
+# check for gettid()
+gettid="no"
+cat > $TMPC << EOF
+#include <unistd.h>
+int main(int argc, char **argv)
+{
+ return gettid();
+}
+EOF
+if compile_prog "" "" "gettid"; then
+ gettid="yes"
+fi
+print_config "gettid" "$gettid"