[THRIFT-5855]: Add makefile detection for clang support
This is necessary for fuzzing builds.
diff --git a/configure.ac b/configure.ac
index 20be01e..c8c740c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,6 +95,18 @@
AC_PROG_AWK
AC_PROG_RANLIB
+# Check if we're using Clang
+AC_MSG_CHECKING([whether we are using Clang])
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([], [[
+ #ifndef __clang__
+ not clang
+ #endif
+ ]])],
+ [CLANG=yes], [CLANG=no])
+AC_MSG_RESULT([$CLANG])
+AM_CONDITIONAL([USING_CLANG], [test "x$CLANG" = "xyes"])
+
AC_LANG([C++])
AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])