BuildLibraries is defined in X11.tmpl, but Imake.tmpl uses it
to define LdPreLib before X11.tmpl is included.  The result is that
every Imakefile using LdPreLib will end up using an incorrect definition.  
This is usually harmless on native builds, but breaks cross compilation 
badly and may cause problems when building X on a machine with a 
significantly older version installed.

It's not easy to fix though.  X11.rules uses LdPreLib in defining 
LdPreLibs, and X11.rules is included before X11.tmpl.

Here's what I've done:

1)      Removed dependency on BuildLibraries for LdPreLib, LdPreLib now
        refers only to -L$(BUILDLIBDIR) or -L$(USRLIBDIR) depending on
        UseInstalled and AlternateUsrLibDir.  This means that LdPreLib
        never contains -L$(USRLIBDIR) unless UseInstalled is set to YES

2)      Created a new make variable 'INSTALLED_LIBS' parallel to 
        'INSTALLED_INCLUDES' which points at the installed libraries
        if any of them might be useful.  This gets set to
        -L$(USRLIBDIR) when !defined(UseInstalled) && !BuildLibraries && 
        AlternateUsrLibDir.  Otherwise it's left as NULL.  

3)      Add $(INSTALLED_LIBS) to LDPRELIB and LDPRELIBS values.

Keith Packard        XFree86 Core Team        HP Cambridge Research Lab


_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to