Problem compiling in nagios 2.5

Since there are new version, I decide to shift to 2.5 but i have problem compiling in 2.5. I got error in pthread which is the first time i encountered this problem when installing nagios. Here is the problem:

checking pthread.h usability… no
checking pthread.h presence… yes
configure: WARNING: pthread.h: present but cannot be compiled
configure: WARNING: pthread.h: check for missing prerequisite headers?
configure: WARNING: pthread.h: see the Autoconf documentation
configure: WARNING: pthread.h: section "Present But Cannot Be Compiled"
configure: WARNING: pthread.h: proceeding with the preprocessor’s result
configure: WARNING: pthread.h: in the future, the compiler will take precedence
configure: WARNING: ## ------------------------------------------ ##
configure: WARNING: ## Report this to the AC_PACKAGE_NAME lists. ##
configure: WARNING: ## ------------------------------------------ ##
checking for pthread.h… yes
checking pthreads.h usability… no
checking pthreads.h presence… no
checking for pthreads.h… no

After this, i tried “make all” but there’s also an error which probably came from compiling it.

Is there any missing plugins or anything that i need to install?

Install v2.4. Does that work?