PHP 5.3 compile on Solaris 10 : make distclean :: fatal error

I'm trying to install PHP 5.3 on Solaris 10 .
I'm using etc/apache2
and installed mysql 5.1.39.
When I tried to compile PHP 5.3, with the following configure text,

./configure --with-mysql=/usr/local/mysql \
--with-mysqli=/usr/local/mysql/bin/mysql_config --with-zlib-dir=/usr/local \
--with-config-file-path=/usr/local/lib/php --with-freetype-dir=/usr/local \
--with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-xpm-dir=/usr/local \
--with-xpm-dir=/usr/local --with-ttf=/usr/local

it makes fail and said mysql lib is not correct or somewhere else error.
So I tried to run "make distclean" command but it shows
"make: Fatal error: Don't know how to make target `distcelan'" error
How do I fix that problem?
I really need help and appreciate your help.

According to the error message, you made a typo.
Otherwise, make sure there is a distclean entry in the Makefile.

Can you please help how to check the distclean entry in the make file?
Thanks.

did you read what jlliagre said? You typed "distcelan" , not
"distclean". correct the typo.

Even I correctly type distclean it doesn't work

what is the new error? Are you using GNU Make?

Start with:

grep distclean Makefile

Did the configure step finish? If not, there will be no Makefile, and no rules that make could execute.

Hi ,frank_rizzo
The same error.
aaa@ekh09:src/php>make distclean
make: Fatal error: Don't know how to make target `distclean'
Don't know which "make"?

Hi, jlliagre

Error:

aaa@ekh09:src/php>grep distclean Makefile
grep: can't open Makefile

If there is no Makefile yet, there is no much point running make. As pludi stated, have configure completed first.

./configure --with-mysql=/usr/local/mysql \
--with-mysqli=/usr/local/mysql/bin/mysql_config \
--with-apxs2=/usr/apache2/bin/apxs --enable-snapshot-build \
--with-zlib-dir=/usr/local --with-config-file-path=/usr/local/lib/php \
--with-freetype-dir=/usr/local --with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local --with-xpm-dir=/usr/local --with-ttf=/usr/local

So I configure with the above syntax and got an error message of:

checking for mysql_set_server_option in -lmysqlclient... no
configure: error: wrong mysql library version or lib not found. Check config.log
for more information.

so I go and check config.log for last 100 lines as it is too long.
The file contents are:

*******************************************
aaa@ekh09:src/php>tail config.log -n100
#line 59816 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char mysql_set_server_option();

int main() {
mysql_set_server_option()
; return 0; }
*********************************************

I'm using etc/apache2
Please help and advice me.
Thank you so much.

A custom mysql is a prerequisite according to the command line you run.
Did you build or install one in /usr/local/mysql ?

Yes. I build mysql under
/usr/local

Then check why configure is complaining about it: "wrong mysql library version or lib not found". Instead of picking the last few lines of config.log, look for messages related to mysql in it.

@ppa108: Use code tags for source code, listings, or command lines. It's easier to read and won't upset the automatic translation service.

Mysql library 'd been solved when I added the path

"--with-mysqli-dir=/usr/local/mysql/lib"

and configure could run successfully
But when I run the "make" the following error was shown:

ld: fatal: file /usr/local/mysql/lib/libmysqlclient.so: wrong ELF class: ELFCLAS
S64
ld: fatal: File processing errors. No output written to .libs/libphp5.so
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `libphp5.la'

Please advice.
Thank you.

That is a 32 bit / 64 bit mismatch. You compiled mysql in 64 bit but php in 32 bit.

Please advice me which is better?As I have limited experience.
Should I re-install mysql 32 bit or download php 64 bit?
Thanks.

Why are you compiling PHP in the first place ?

I need a web server(apache,mysql,php) in my solaris sparc 10 OS and I need to install Drupal CMS.