Depends on the way libjpeg.so is linked. Here's an article that covers the basics:<br><br><a href="http://www.linux.org/docs/ldp/howto/Program-Library-HOWTO/shared-libraries.html">http://www.linux.org/docs/ldp/howto/Program-Library-HOWTO/shared-libraries.html</a><br>
<br>If each version of libjpeg has a distinct soname, then the trick is to get the compilation/link steps to find (1) the header files for the version you want to link to and (2) a symlink called libjpeg.so that points to the libjpeg.so.X.Y you want to link to.<br>
<br>To find the soname of a shared object file you can use:<br><br> objdump -x /usr/local/lib/libjpeg.so.62 | grep SONAME<br><br>I have no experience with building PHP so I don't know how hard it will be to configure the build process to look for headers and library files in non-standard locations. I suspect the --with-jpeg-dir= option is for the header files. That dir probably needs an include/ folder with the headers in it. Perhaps it also could have a lib/ folder with the sym-link to actual shared library you want to link to? Otherwise perhaps there's another config option for the link step.<br>
<br><br>Kendall<br><br><br><div class="gmail_quote">On Tue, Jun 29, 2010 at 9:45 AM, Daniel A. Ramaley <span dir="ltr"><<a href="mailto:daniel.ramaley@drake.edu">daniel.ramaley@drake.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
If multiple versions of a library are installed, is is possible to<br>
compile software against a specific version? If so, how?<br>
<br>
My specific situation is that a web server has 3 versions of libjpeg<br>
installed, 6.2, 7.0, and 8.0. I need to compile PHP against version 6.2,<br>
but it always finds the 8.0 version instead. All 3 versions are<br>
installed in /usr/local. I tried configuring PHP specifying the exact<br>
one using --with-jpeg-dir=/usr/local/lib/libjpeg.so.62, but it still<br>
ended up using the 8.0 version. Unfortunately, i can't just remove the<br>
newer versions as other running software is using it.<br>
<br>
--<br>
Daniel A. Ramaley<br>
Network Engineer 2<br>
<br>
Dial Center 118, Drake University<br>
2407 Carpenter Ave / Des Moines IA 50311 USA<br>
Tel: +1 515 271-4540<br>
Fax: +1 515 271-1938<br>
E-mail: <a href="mailto:daniel.ramaley@drake.edu">daniel.ramaley@drake.edu</a><br>
_______________________________________________<br>
Cialug mailing list<br>
<a href="mailto:Cialug@cialug.org">Cialug@cialug.org</a><br>
<a href="http://cialug.org/mailman/listinfo/cialug" target="_blank">http://cialug.org/mailman/listinfo/cialug</a><br>
</blockquote></div><br>