Heiko Muenkel wrote:
     Martin> Does a very simple `./configure; make' work?
 
 No. The reason for using --site-libraries=${LD_LIBRARY_PATH} and
 --site-includes=${C_INCLUDE_PATH} is, that I've an old version of
 libpng in /usr/X11R6/* and a newer one at another place. In such cases
 it seems to be hard under Linux (it's no problem under Solaris) to get
 the right versions. One reason is the file /etc/ld.so.conf, which
 overwrites the settings of the LD_LIBRARY_PATH. 
LD_LIBRARY_PATH takes precedence over ld.so.conf. However,
LD_LIBRARY_PATH only affects the dynamic linking, not compile-time
linking. For that, you need to use LIBRARY_PATH.
 Therefore it is hard
 (or impossible?) for a normal user to install a XEmacs with private
 versions of needed libraries like the png. I got the right version
 during the installation by using --site-includes and --site-libraries, 
 but I'm not sure, which version I'll get during runing the XEmacs. Any 
 ideas how to test that?  
	ldd `which xemacs`
should tell you, although it doesn't work right if you have both
libc-5 and libc-6 libraries (it will tell you about the first one
which it finds, even if the dynamic linker ignores it because it uses
a different libc).
In general, you can usually get the correct libraries by setting
LD_LIBRARY_PATH appropriately.
The only thing that really causes problems is if the linker was given
a -rpath switch. The only thing that will get around that is hacking
the binary (or the dynamic linker).
-- 
Glynn Clements <glynn(a)sensei.co.uk>