fixed the problem in which 'AM_CFLAGS' is specified despite of using C++ source code.