THRIFT-4165: better cmake support for C++ language level selection; fixed compiler warnings

This closes #1236
diff --git a/configure.ac b/configure.ac
index bb25495..0c628da 100755
--- a/configure.ac
+++ b/configure.ac
@@ -100,6 +100,10 @@
 
 AC_LANG([C++])
 AX_CXX_COMPILE_STDCXX_11([noext], [optional])
+if test "$ac_success" = "no"; then
+  CXXFLAGS="$CXXFLAGS -Wno-variadic-macros -Wno-long-long -Wno-c++11-long-long"
+fi
+CXXFLAGS="$CXXFLAGS -Wno-deprecated-register"
 
 AM_EXTRA_RECURSIVE_TARGETS([style])
 AC_SUBST(CPPSTYLE_CMD, 'find . -type f \( -iname "*.h" -or -iname "*.cpp" -or -iname "*.cc" -or -iname "*.tcc" \) -printf "Reformatting: %h/%f\n" -exec clang-format -i {} \;')
@@ -198,8 +202,8 @@
 
 echo "OpenSSL check"
 if test "$have_cpp" = "yes" -o "$have_c_glib" = "yes";  then
-	echo "Have cpp or c so we check for OpenSSL"
-	AX_CHECK_OPENSSL()
+  echo "Have cpp or c so we check for OpenSSL"
+  AX_CHECK_OPENSSL()
 fi
 
 AX_THRIFT_LIB(csharp, [C#], yes)