Index: configure.ac
===================================================================
--- configure.ac	(revision a77257bee9b89057fbbd5f12095d886c5be82c4c)
+++ configure.ac	(revision 0ea0b8f1c2052594f0cc5192a530dc61586fd019)
@@ -24,4 +24,16 @@
 #Trasforming cc1 will break compilation
 M4CFA_PROGRAM_NAME
+
+#==============================================================================
+# New AST toggling support
+AH_TEMPLATE([CFA_USE_NEW_AST],[Sets whether or not to use the new-ast, this is adefault value and can be overrided by --old-ast and --new-ast])
+AC_ARG_ENABLE(new-ast,
+	[  --enable-new-ast     whether or not to use new ast as the default AST algorithm],
+	[case "${enableval}" in
+		yes) newast=true ;;
+		no)  newast=false ;;
+		*) AC_MSG_ERROR([bad value ${enableval} for --enable-new-ast]) ;;
+	esac],[newast=false])
+AC_DEFINE_UNQUOTED([CFA_USE_NEW_AST], $newast)
 
 #==============================================================================
Index: src/CompilationState.cc
===================================================================
--- src/CompilationState.cc	(revision a77257bee9b89057fbbd5f12095d886c5be82c4c)
+++ src/CompilationState.cc	(revision 0ea0b8f1c2052594f0cc5192a530dc61586fd019)
@@ -14,4 +14,6 @@
 //
 
+#include "config.h"
+
 int
 	astp = false,
@@ -28,5 +30,5 @@
 	genproto = false,
 	deterministic_output = false,
-	useNewAST = true,
+	useNewAST = CFA_USE_NEW_AST,
 	nomainp = false,
 	parsep = false,
Index: src/config.h.in
===================================================================
--- src/config.h.in	(revision a77257bee9b89057fbbd5f12095d886c5be82c4c)
+++ src/config.h.in	(revision 0ea0b8f1c2052594f0cc5192a530dc61586fd019)
@@ -27,4 +27,8 @@
 /* Location of cfa install. */
 #undef CFA_PREFIX
+
+/* Sets whether or not to use the new-ast, this is adefault value and can be
+   overrided by --old-ast and --new-ast */
+#undef CFA_USE_NEW_AST
 
 /* Major.Minor */
