Compiling Astrisk w/ RHEL5

I am new to both Asterisk and Linux. I have installed the packages for Asterisk 1.4.4 but when I run “make” Igrt the following:

**** The configure script must be executed before running ‘make’.

When I run the ./configure I get this:

[root@localhost asterisk-1.4.4]# ./configure
checking build system type… i686-pc-linux-gnu
checking host system type… i686-pc-linux-gnu
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking how to run the C preprocessor… gcc -E
checking for grep that handles long lines and -e… /bin/grep
checking for egrep… /bin/grep -E
checking for AIX… no
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking minix/config.h usability… no
checking minix/config.h presence… no
checking for minix/config.h… no
checking whether it is safe to define EXTENSIONS… yes
checking for uname… /bin/uname
checking for gcc… (cached) gcc
checking whether we are using the GNU C compiler… (cached) yes
checking whether gcc accepts -g… (cached) yes
checking for gcc option to accept ISO C89… (cached) none needed
checking for g++… no
checking for c++… no
checking for gpp… no
checking for aCC… no
checking for CC… no
checking for cxx… no
checking for cc++… no
checking for cl.exe… no
checking for FCC… no
checking for KCC… no
checking for RCC… no
checking for xlC_r… no
checking for xlC… no
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

I am using GCC 4.1.1

What am I doing.

perform a yum install gcc-c++ compat-gcc-32 compat-gcc-32-c++ and rerun the ./configure.

I ran the following command and re ran ./configure and got the same results.
install gcc-c++ compat-gcc-32 compat-gcc-32-c++ as well as yum install gcc-c++ compat-gcc-32 compat-gcc-32-c++

please post the output of rpm -qa | grep -i cpp

[root@localhost asterisk-1.4.4]# rpm -qa | grep -i cpp
cpp-4.1.1-52.el5

I don’t think you have the right cpp libraries installed. Here’s my output and I’ve rebuilt this machine numerous times to practice / streamline my Asterisk setup.

[root@localhost ~]# rpm -qa | grep -i gcc
libgcc-3.4.6-8
gcc-c+±3.4.6-8
compat-gcc-32-3.2.3-47.3
gcc-3.4.6-8
compat-gcc-32-c+±3.2.3-47.3
[root@localhost ~]# rpm -qa | grep -i cpp
cpp-3.4.6-8
[root@localhost ~]#

Where or how do I get the right libraries and install them?