Official method for determining modular X module path?
daniel at freedesktop.org
Thu Dec 1 11:18:36 PST 2005
On Thu, Dec 01, 2005 at 08:42:18AM +0000, Aric Cyr wrote:
> Daniel Stone <daniel <at> freedesktop.org> writes:
> > On Wed, Nov 30, 2005 at 03:42:26PM -0800, Andy Ritger wrote:
> > > The installer for the next NVIDIA Linux driver release will run
> > > the above command; if that is successful and returns a directory
> > > that exists, it will be used, otherwise the NVIDIA installer will
> > > fall back to /usr/X11R6/lib/modules.
> > >
> > > Is that the proper heuristic to use?
> > Err. Surely something like the above:
> > MODULEDIR="$(pkg-config --variable=moduledir xorg-server)"
> > if [ -z "$MODULEDIR" ]; then
> > MODULEDIR="/usr/lib/xorg/modules"
> > fi
> > if [ ! -d "$MODULEDIR" ] && [ ! -L "$MODULEDIR" ]; then
> > MODULEDIR="/usr/X11R6/lib/modules"
> > fi
> Is /usr/lib/xorg/ spec'ed out somewhere to be the defacto
> location for the modules directory? Seems like Gentoo and Ubuntu
> agree that it is the right spot, but if other distros don't know that
> your above heuristic would fail if neither of those locations were
$(libdir)/xorg/modules is hardcoded in several spots, yeah.
> This is the sort of info that should be (at least) in the wiki,
> if it's not already. I couldn't find any relevant docs on the issue
> from a quick search (other than a #define in a header file that obviously
> defined the default module path as /usr/lib/xorg/modules).
I don't think a header file would be generally useful: this would seem
to be exactly the sort of thing that pkg-config was designed for.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: Digital signature
More information about the xorg