Need help with installation of Aterisk

Hello. I have a problem while installing Asterisk on the CentOS5.2.
Here is the error I get:

checking whether we are using the GNU C++ compiler… no
checking whether g++ accepts -g… no
checking how to run the C preprocessor… gcc -E
checking how to run the C++ preprocessor… /lib/cpp
configure: error: C++ preprocessor “/lib/cpp” fails sanity check
See `config.log’ for more details.

In config.log i see

configure:3137: gcc -E conftest.c
conftest.c:9:28: error: ac_nonexistent.h: No such file or directory
configure:3143: $? = 1
configure: failed program was:
| /* confdefs.h. /
| #define PACKAGE_NAME “asterisk”
| #define PACKAGE_TARNAME “asterisk”
| #define PACKAGE_VERSION “1.4”
| #define PACKAGE_STRING “asterisk 1.4”
| #define _GNU_SOURCE 1
| /
end confdefs.h. */

Any ideas?

Just to answer my own question. I was missing gcc-c++ package.