diff -c -r usql-0.8.1.orig/configure.ac usql-0.8.1/configure.ac
*** usql-0.8.1.orig/configure.ac	2015-01-18 00:10:35.000000000 -0200
--- usql-0.8.1/configure.ac	2016-08-02 12:56:28.191690000 -0300
***************
*** 7,14 ****
  AC_INIT([usqlcc], [0.8])
  AM_CONFIG_HEADER(config.h)
  AC_CONFIG_AUX_DIR(config)
  AC_CONFIG_SRCDIR(include/usql/SQLParser.h)
! AM_INIT_AUTOMAKE([subdir-objects])
  
  ##############################
  # Constants
--- 7,15 ----
  AC_INIT([usqlcc], [0.8])
  AM_CONFIG_HEADER(config.h)
  AC_CONFIG_AUX_DIR(config)
+ AC_CONFIG_MACRO_DIRS([m4])
  AC_CONFIG_SRCDIR(include/usql/SQLParser.h)
! AM_INIT_AUTOMAKE([foreign subdir-objects])
  
  ##############################
  # Constants
***************
*** 23,30 ****
  
  AC_PROG_CC
  AC_PROG_INSTALL
- AC_PROG_RANLIB
  AC_LANG_CPLUSPLUS
  
  ##############################
  # Checks for header files.
--- 24,31 ----
  
  AC_PROG_CC
  AC_PROG_INSTALL
  AC_LANG_CPLUSPLUS
+ AM_PROG_LIBTOOL
  
  ##############################
  # Checks for header files.
***************
*** 101,115 ****
  	AC_CHECK_LIB([mysqlclient],[main],,[AC_MSG_ERROR(uSQL examples need libmysqlclient)])
  	AC_CHECK_LIB([memcached],[main],,[AC_MSG_ERROR(uSQL examples need libmemcached)])
  	AC_CHECK_LIB([leveldb],[main],,[AC_MSG_ERROR(uSQL examples need leveldb)])
! 	AC_CHECK_LIB([boost_filesystem],[main],,[AC_MSG_ERROR(uSQL unittests need boost::filesystem)])
  fi
  
  AC_ARG_ENABLE([tests], AC_HELP_STRING([--enable-tests], [ builds tests (default = no) ]), [build_tests="yes"], [])
  AM_CONDITIONAL(UNITTESTS,test "$build_tests" = yes)
  if [ test "$build_tests" = yes ]; then
! 	AC_CHECK_LIB([boost_unit_test_framework],[main],,[AC_MSG_ERROR(uSQL unittests need boost::unit_test_framework)])
! 	AC_CHECK_LIB([boost_system],[main],,[AC_MSG_ERROR(uSQL unittests need boost::system)])
! 	AC_CHECK_LIB([boost_filesystem],[main],,[AC_MSG_ERROR(uSQL unittests need boost::filesystem)])
  fi
  
  ##############################
--- 102,116 ----
  	AC_CHECK_LIB([mysqlclient],[main],,[AC_MSG_ERROR(uSQL examples need libmysqlclient)])
  	AC_CHECK_LIB([memcached],[main],,[AC_MSG_ERROR(uSQL examples need libmemcached)])
  	AC_CHECK_LIB([leveldb],[main],,[AC_MSG_ERROR(uSQL examples need leveldb)])
! 	AC_CHECK_LIB([boost_filesystem],[main],,[AC_CHECK_LIB([boost_filesystem-mt],[main],,[AC_MSG_ERROR(uSQL unittests need boost::filesystem)])])
  fi
  
  AC_ARG_ENABLE([tests], AC_HELP_STRING([--enable-tests], [ builds tests (default = no) ]), [build_tests="yes"], [])
  AM_CONDITIONAL(UNITTESTS,test "$build_tests" = yes)
  if [ test "$build_tests" = yes ]; then
! 	AC_CHECK_LIB([boost_unit_test_framework],[main],,[AC_CHECK_LIB([boost_unit_test_framework-mt],[main],,[AC_MSG_ERROR(uSQL unittests need boost::unit_test_framework)])])
! 	AC_CHECK_LIB([boost_system],[main],,[AC_CHECK_LIB([boost_system-mt],[main],,[AC_MSG_ERROR(uSQL unittests need boost::system)])])
! 	AC_CHECK_LIB([boost_filesystem],[main],,[AC_CHECK_LIB([boost_filesystem-mt],[main],,[AC_MSG_ERROR(uSQL unittests need boost::filesystem)])])
  fi
  
  ##############################
diff -c -r usql-0.8.1.orig/include/Makefile.am usql-0.8.1/include/Makefile.am
*** usql-0.8.1.orig/include/Makefile.am	2015-01-18 00:10:35.000000000 -0200
--- usql-0.8.1/include/Makefile.am	2016-08-02 11:14:54.257093300 -0300
***************
*** 3,36 ****
  ########################################
  
  usqlcc_header = \
! 	usql//SQL92Parser.h \
! 	usql//SQLError.h \
! 	usql//SQLNode.h \
! 	usql//SQLNodes.h \
! 	usql//SQLParser.h \
! 	usql//SQLStatement.h \
! 	usql//UnQLParser.h \
! 	usql//GQLParser.h \
! 	usql//node/SQLCollection.h \
! 	usql//node/SQLCollections.h \
! 	usql//node/SQLColumns.h \
! 	usql//node/SQLCommand.h \
! 	usql//node/SQLCondition.h \
! 	usql//node/SQLDataSet.h \
! 	usql//node/SQLExpression.h \
! 	usql//node/SQLFunction.h \
! 	usql//node/SQLGroupBy.h \
! 	usql//node/SQLIndex.h \
! 	usql//node/SQLLimit.h \
! 	usql//node/SQLOffset.h \
! 	usql//node/SQLOperator.h \
! 	usql//node/SQLOption.h \
! 	usql//node/SQLOrder.h \
! 	usql//node/SQLOrderBy.h \
! 	usql//node/SQLSet.h \
! 	usql//node/SQLSets.h \
! 	usql//node/SQLTransaction.h \
! 	usql//node/SQLValues.h
  
  ########################################
  # Library
--- 3,36 ----
  ########################################
  
  usqlcc_header = \
! 	usql/SQL92Parser.h \
! 	usql/SQLError.h \
! 	usql/SQLNode.h \
! 	usql/SQLNodes.h \
! 	usql/SQLParser.h \
! 	usql/SQLStatement.h \
! 	usql/UnQLParser.h \
! 	usql/GQLParser.h \
! 	usql/node/SQLCollection.h \
! 	usql/node/SQLCollections.h \
! 	usql/node/SQLColumns.h \
! 	usql/node/SQLCommand.h \
! 	usql/node/SQLCondition.h \
! 	usql/node/SQLDataSet.h \
! 	usql/node/SQLExpression.h \
! 	usql/node/SQLFunction.h \
! 	usql/node/SQLGroupBy.h \
! 	usql/node/SQLIndex.h \
! 	usql/node/SQLLimit.h \
! 	usql/node/SQLOffset.h \
! 	usql/node/SQLOperator.h \
! 	usql/node/SQLOption.h \
! 	usql/node/SQLOrder.h \
! 	usql/node/SQLOrderBy.h \
! 	usql/node/SQLSet.h \
! 	usql/node/SQLSets.h \
! 	usql/node/SQLTransaction.h \
! 	usql/node/SQLValues.h
  
  ########################################
  # Library
diff -c -r usql-0.8.1.orig/lib/unix/Makefile.am usql-0.8.1/lib/unix/Makefile.am
*** usql-0.8.1.orig/lib/unix/Makefile.am	2015-01-18 00:10:35.000000000 -0200
--- usql-0.8.1/lib/unix/Makefile.am	2016-08-02 13:46:09.084471500 -0300
***************
*** 1,6 ****
! lib_LIBRARIES = libusql++.a
  
! AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_builddir)/src/
  
  ########################################
  # uSQL for C++
--- 1,6 ----
! lib_LTLIBRARIES = libusql++.la
  
! AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src/
  
  ########################################
  # uSQL for C++
***************
*** 27,31 ****
  	../../src/usql/parser/antlr/SQLLexerFunc.cpp \
  	../../src/usql/parser/antlr/SQLParserFunc.cpp
  
! libusql___a_SOURCES = \
!         $(usqlcc_source)
--- 27,31 ----
  	../../src/usql/parser/antlr/SQLLexerFunc.cpp \
  	../../src/usql/parser/antlr/SQLParserFunc.cpp
  
! libusql___la_SOURCES = $(usqlcc_source)
! libusql___la_LDFLAGS = -no-undefined
diff -c -r usql-0.8.1.orig/Makefile.am usql-0.8.1/Makefile.am
*** usql-0.8.1.orig/Makefile.am	2015-01-18 00:10:35.000000000 -0200
--- usql-0.8.1/Makefile.am	2016-08-02 13:44:29.093089800 -0300
***************
*** 1,3 ****
--- 1,5 ----
+ ACLOCAL_AMFLAGS = -I m4
+ 
  if UNITTESTS
  if EXAMPLES
  SUBDIRS = include lib unittest examples
diff -c -r usql-0.8.1.orig/src/usql/SQLNodeList.cpp usql-0.8.1/src/usql/SQLNodeList.cpp
*** usql-0.8.1.orig/src/usql/SQLNodeList.cpp	2015-01-18 00:10:35.000000000 -0200
--- usql-0.8.1/src/usql/SQLNodeList.cpp	2016-08-02 13:41:11.388308300 -0300
***************
*** 39,45 ****
        return n;
    }
    
!   return -1;
  }
  
  static bool SQLNodeListAddAsChildNode(uSQL::SQLNodeList *nodeList, uSQL::SQLNode *parentNode, size_t childNodeIndex)
--- 39,45 ----
        return n;
    }
    
!   return 0;
  }
  
  static bool SQLNodeListAddAsChildNode(uSQL::SQLNodeList *nodeList, uSQL::SQLNode *parentNode, size_t childNodeIndex)
diff -c -r usql-0.8.1.orig/unittest/unix/Makefile.am usql-0.8.1/unittest/unix/Makefile.am
*** usql-0.8.1.orig/unittest/unix/Makefile.am	2015-01-18 00:10:35.000000000 -0200
--- usql-0.8.1/unittest/unix/Makefile.am	2016-08-02 13:00:19.750398000 -0300
***************
*** 1,4 ****
--- 1,5 ----
  noinst_PROGRAMS = usqlcctestunit
+ TESTS = usqlcctestunit
  
  AM_CPPFLAGS = -I$(top_srcdir)/include -I../
  
***************
*** 12,15 ****
  	../SqlEngineTestSQL92Parser.cpp \
  	../SqlEngineTestUnQLParser.cpp
  
! usqlcctestunit_LDADD = ../../lib/unix/libusql++.a -lboost_unit_test_framework
--- 13,16 ----
  	../SqlEngineTestSQL92Parser.cpp \
  	../SqlEngineTestUnQLParser.cpp
  
! usqlcctestunit_LDADD = $(top_builddir)/lib/unix/.libs/libusql++.a $(LIBS)
