Installing Asterisk

OS: Centos 5.7
Kernel: 2.6.18-371.11.1.el5
Autoconf: 2.61

Getting the error below trying to run the ./configure script. Any suggestions would be great.

checking size of long long… (cached) 8
./configure: line 30228: syntax error near unexpected token ac_cv_sizeof_fd_set_fds_bits,' ./configure: line 30228:AC_COMPUTE_INT(ac_cv_sizeof_fd_set_fds_bits, sizeof(foo.fds_bits[[0]]), $ac_includes_default’

Your post has limited information, but it sounds like you are either missing a dependency, have a path issue, or using the wrong configure command. Here are some things to looks at.
Be sure the user you have created to install Asterisk is on the sudo list so it has the permissions to execute and to get the the paths required to compile.
You did not mention if you are running 32 or 64 bit Centos. If it is 64 bit the command has to be
./configure --libdir=/usr/lib64
There is a list of dependencies that I do not have in front of me. They are mostly tools to compile Asterisk like gcc, gcc-c++, ncurses-devel, etc. The list of things you need should be easy to find online.

I have not installed Asterisk 11.8 on Centos 5.7, but I have installed it several times on Centos 6.5 Server and if you do it correctly it installs in about 30 minutes

Although configure tries lots of things that should fail, they should produce diagnostics in its log file, not on the console. Although there may be an underlying problem , it does look as though configure either has a bug, or is assuming that it is running in an environment that is radically outside what it was designed for. Generally configure should be checking for its pre-requisites, but it is possible that a custom rule assumes bash but fails to check that bash is actually being used.