Problem compiling Asterisk

This is on OpenSolaris. I ran across a problem that was in the bug db so I’m hoping someone can help me.

The bug is

The fix seems to be "If I add -D__EXTENSIONS__=1 in makeopts, I can get all the .c files to compile. "

But I’m confused as to where to add -D__EXTENSIONS__=1 in makeopts.

Is it supposed to go in GC_FLAGS so that it is GC_FLAGS=-D__EXTENSIONS__=1 ?

I tried that but I’m still getting the same error. I am compiling the sources I checked out of trunk.

I got SVN-branch-1.4-r180194M compiled and working on Solaris 10 x86 (8/07)

There was a problem installing with ‘gmake isntall’ for some reason, when it went into subdirectories, it couldn’t run install-sh

I changed INSTALL=./install-sh to use the full path and it fixed it

Trying to get the main trunk (1.6) on the same setup fails. I’m getting

[BISON] /root/asterisk/asterisk-trunk/main/ast_expr2.y -> /root/asterisk/asterisk-trunk/main/ast_expr2.c
make[1]: *** [/root/asterisk/asterisk-trunk/main/ast_expr3.c] Segmentation Fault (core dumped)
make: *** [utils Error 2
None:0: /usr/sfw/bin/gm4: ERROR: EOF in string

I’m using GNU Bison 1.875 and GNU m4 1.4.2

Any thoughts on this?

Also, still no luck with the latest OpenSolaris download and any asterisk download.