php-5.2.0のインストールで、makeでエラーが出ています。

make: *** [sapi/apache/sapi_apache.lo] Error 1

configureで--with-apxs=/usr/local/apache/bin/apxsを付けています。
何が問題なんでしょう?
Solaris10 x86です。
以下エラーあたりのログです。

In file included from /usr/local/apache/include/buff.h:32,
from /usr/local/apache/include/httpd.h:36,
from /var/spool/pkg/php-5.2.0/sapi/apache/php_apache_http.h:47,
from /var/spool/pkg/php-5.2.0/sapi/apache/sapi_apache.c:24:
/usr/local/include/openssl/ssl.h:747: error: syntax error before "X509_VERIFY_PA
RAM"
/usr/local/include/openssl/ssl.h:755: error: syntax error before '}' token
/usr/local/include/openssl/ssl.h:896: error: syntax error before "X509_VERIFY_PA
RAM"
/usr/local/include/openssl/ssl.h:976: error: syntax error before '}' token
In file included from /usr/local/include/openssl/ssl.h:983,
from /usr/local/apache/include/buff.h:32,