Compilibg Asterisk on Solaris 10 (Intel)

We want to test Asterisk on one of our Sun servers loaded wih Solaris 10 (Intel). Installed Zaptel,Libpri,Asterisk,Asterisk-addons,Asterisk-sounds and Bison from www.asterisk.org.

Then cd to asterisk-1.0.7 directory and run make command. Got the error.


make

grep: illegal option – q
Usage: grep -hblcnsviw pattern file . . .
grep: illegal option – q
Usage: grep -hblcnsviw pattern file . . .
/bin/sh: !: not found
*** You don’t have mpg123 installed. You’re going to need ***
*** it if you want MusicOnHold ***
./mkdep -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g -Iinclude -I…/include -D_REENTRANT -D_GNU_SOURCE -O6 -DASTERISK_VERSION=“1.0.7” -DINSTALL_PREFIX="" -DASTETCDIR="/etc/asterisk" -DASTLIBDIR="/usr/lib/asterisk" -DASTVARLIBDIR="/var/lib/asterisk" -DASTVARRUNDIR="/var/run" -DASTSPOOLDIR="/var/spool/asterisk" -DASTLOGDIR="/var/log/asterisk" -DASTCONFPATH="/etc/asterisk/asterisk.conf" -DASTMODDIR="/usr/lib/asterisk/modules" -DASTAGIDIR="/var/lib/asterisk/agi-bin" -DBUSYDETECT_MARTIN ls *.c
./mkdep: !: not found
./mkdep: /tmp/mkdep1147/mkdep: cannot create
mkdep: compile failed.
make: *** [.depend] Error 1


Your help is appreciated.

Thanks in advance