Solaris, Apache and mod_SSL

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
lex.ssl_expr_yy.c Failure
If your build fails processing the ssl_expr functions then you've run in to the yacc problem. It generates a source file that uses the reserved word "str" for a variable name and upsets gcc. 
To fix this, you will need to edit /src/modules/ssl/ssl_expr_scan.c ...
Locate the function " ssl_expr_yy_scan_string", it probably looks like this:
YY_BUFFER_STATE ssl_expr_yy_scan_string (yyconst char * str )

        return ssl_expr_yy_scan_bytes(str,strlen(str) );

You need to modify the three occurrences of "str" so that they are not "str", you could use "yy_str" or maybe even "fred". They just can't be a reserved word like "str".