This is actually two questions in one, but I suspect they have similar answers.
I have a program which has a dependency on an X11 library which on OS10.4 has a different name and is in a different place (compared to on 10.5 and 10.6).
This same program also has a dependency on a library which does not work on ppc. This dependency can be removed when compiling for ppc, but I would like to use this library when I can (as it gives speedups of several orders of magnitude).
So the two questions are:
How do I link to a dynamic library which in a different place in different OS versions? Or rephrased - how do I make the dynamic linker load a library from a different place on different OS versions?
How do I make some parts (the Intel parts) of a universal binary link to a library while not having the ppc parts link to that library?
Of course, if there are other solutions to my problems, I am also interested.