build: check for required builtin functions
These builtins are implemented by both gcc and clang since a long time
and we don't provide fallback for them. Let the configure phase check
for them.
diff --git a/configure.ac b/configure.ac
index 3dde5d9..30eea86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,6 +47,9 @@
AC_CHECK_FUNCS_ONCE([__secure_getenv secure_getenv])
AC_CHECK_FUNCS_ONCE([finit_module])
+CC_CHECK_FUNC_BUILTIN([__builtin_clz])
+CC_CHECK_FUNC_BUILTIN([__builtin_types_compatible_p])
+
# dietlibc doesn't have st.st_mtim struct member
AC_CHECK_MEMBERS([struct stat.st_mtim], [], [], [#include <sys/stat.h>])