Ok, I finally solved the problem after an all nighter. Here's the deal when you want to install Pdflib support on php4:
Get libraries for pdflib, jpeg, tiff, zlib from links given in the manual or from sites like sunfreeware.com. DO configure, make, make install, etc.
configure pdflib, make, make install
In the JPEG directory (whereever you installed jpef libs), you have to CREATE A DIRECTORY, /lib. Copy all the files that contain the txt, "jpeg_read_header", in that lib directory. Also copy the *.a files in that lib directory. I have version 6b installed. This is because the "configure" file of php will look for this subroutine (jpeg_read_header) in that lib directory. You can see that by going through configure file of php4
pdflib documentation talks about having the default zlib, tiff, png within pdf lib. That didn't work for me on Solaris, so I suggest ignore that notice and download and install your own libraries. They are free anyways.
Now, when you configure php, use these options:
--with-pdflib=pdflibinstallation
--with-jpeg-dir=jpegLibraryInstallation
--with-zlib-dir=zlibInstallInstallation
--with-tiff-dir=tiffInstallInstallation
Thanks,
Farzal