There is some kind of incompatability between the solaris yacc pre-processor and GNU flex when building mod_ssl. Also mod_ssl requires the GNU version of m4 and will not compile with the Solaris version.
M4 Failure
If your build fails at "flex -Pssl_expr_yy -s -B ssl_expr_scan.l" with error "m4: bad option: -P"
then you are using the Solaris m4. Install the GNU m4 and ensure it is in your path before /usr/ccs/bin/m4