*FLAGS -> AM_*FLAGS; added -Werror to DEBUG_FLAGS; added -Wold-style-cast -Wnon-virtual-dtor to CXXFLAGS