+print_config "getmntent" "$getmntent"
+
+##########################################
+# Check whether we have getmntinfo
+# These are originally added for BSDs, but may also work
+# on other operating systems with getmntinfo(3).
+
+# getmntinfo(3) for FreeBSD/DragonFlyBSD/OpenBSD.
+# Note that NetBSD needs -Werror to catch warning as error.
+if test "$getmntinfo" != "yes" ; then
+ getmntinfo="no"
+fi
+cat > $TMPC << EOF
+#include <stdio.h>
+#include <sys/param.h>
+#include <sys/mount.h>
+int main(int argc, char **argv)
+{
+ struct statfs *st;
+ return getmntinfo(&st, MNT_NOWAIT);
+}
+EOF
+if compile_prog "-Werror" "" "getmntinfo"; then
+ getmntinfo="yes"
+fi
+print_config "getmntinfo" "$getmntinfo"
+
+# getmntinfo(3) for NetBSD.
+if test "$getmntinfo_statvfs" != "yes" ; then
+ getmntinfo_statvfs="no"
+fi
+cat > $TMPC << EOF
+#include <stdio.h>
+#include <sys/statvfs.h>
+int main(int argc, char **argv)
+{
+ struct statvfs *st;
+ return getmntinfo(&st, MNT_NOWAIT);
+}
+EOF
+# Skip the test if the one with statfs arg is detected.
+if test "$getmntinfo" != "yes" && compile_prog "-Werror" "" "getmntinfo_statvfs"; then
+ getmntinfo_statvfs="yes"
+ print_config "getmntinfo_statvfs" "$getmntinfo_statvfs"
+fi
+
+##########################################
+# Check whether we have _Static_assert
+if test "$static_assert" != "yes" ; then
+ static_assert="no"
+fi
+cat > $TMPC << EOF
+#include <assert.h>
+#include <stdlib.h>
+#include <stddef.h>
+
+struct foo {
+ int a, b;
+};
+
+int main(int argc, char **argv)
+{
+ _Static_assert(offsetof(struct foo, a) == 0 , "Check");
+ return 0 ;
+}
+EOF
+if compile_prog "" "" "static_assert"; then
+ static_assert="yes"
+fi
+print_config "Static Assert" "$static_assert"
+
+##########################################
+# Check whether we have bool / stdbool.h
+if test "$have_bool" != "yes" ; then
+ have_bool="no"
+fi
+cat > $TMPC << EOF
+#include <stdbool.h>
+int main(int argc, char **argv)
+{
+ bool var = true;
+ return var != false;
+}
+EOF
+if compile_prog "" "" "bool"; then
+ have_bool="yes"
+fi
+print_config "bool" "$have_bool"
+
+##########################################
+# Check whether we have strndup()
+strndup="no"
+cat > $TMPC << EOF
+#include <string.h>
+#include <stdlib.h>
+int main(int argc, char **argv)
+{
+ char *res = strndup("test string", 8);
+
+ free(res);
+ return 0;
+}
+EOF
+if compile_prog "" "" "strndup"; then
+ strndup="yes"
+fi
+print_config "strndup" "$strndup"
+
+##########################################
+# check march=armv8-a+crc+crypto
+if test "$march_armv8_a_crc_crypto" != "yes" ; then
+ march_armv8_a_crc_crypto="no"
+fi
+if test "$cpu" = "arm64" ; then
+ cat > $TMPC <<EOF
+#include <sys/auxv.h>
+#include <arm_acle.h>
+#include <arm_neon.h>
+
+int main(void)
+{
+ return 0;
+}
+EOF
+ if compile_prog "-march=armv8-a+crc+crypto" "" ""; then
+ march_armv8_a_crc_crypto="yes"
+ CFLAGS="$CFLAGS -march=armv8-a+crc+crypto -DARCH_HAVE_CRC_CRYPTO"
+ fi
+fi
+print_config "march_armv8_a_crc_crypto" "$march_armv8_a_crc_crypto"
+
+##########################################
+# 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"