[PATCH all drivers] config: set more appropriate default drivers location

Dan Nicholson dbn.lists at gmail.com
Thu Mar 25 06:33:03 PDT 2010

On Wed, Mar 24, 2010 at 6:35 PM, Gaetan Nadon <memsize at videotron.ca> wrote:
> On Wed, 2010-03-24 at 14:23 -0700, Dan Nicholson wrote:
> On Wed, Mar 24, 2010 at 12:38 PM, Gaetan Nadon <memsize at videotron.ca> wrote:
>> On Wed, 2010-03-24 at 11:25 -0700, Dan Nicholson wrote:
>> On Wed, Mar 24, 2010 at 11:11 AM, Gaetan Nadon <memsize at videotron.ca>
>> wrote:
>>> The current value is based on $lib which is based on the driver package
>>> $prefix. The driver object code will be installed in the correct xserver
>>> location
>>> only if both the driver package and the xserver package have the same
>>> prefix.
>>> This patch obtains the drivers object code location from the installed
>>> xserver
>>> package through the xorg-server.pc file. The server default location for
>>> drivers
>>> object code is based on its own $lib but this may have been changed at
>>> configuration
>>> time (using with-module-dir). In any case, the resulting net location is
>>> returned.
>>> Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
>>> ---
>>>  configure.ac |    4 ++--
>>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>> diff --git a/configure.ac b/configure.ac
>>> index c1fae22..c3f33a2 100644
>>> --- a/configure.ac
>>> +++ b/configure.ac
>>> @@ -55,9 +55,9 @@ AH_TOP([#include "xorg-server.h"])
>>>  AC_ARG_WITH(xorg-module-dir,
>>>             AC_HELP_STRING([--with-xorg-module-dir=DIR],
>>> -                           [Default xorg module directory
>>> [[default=$libdir/xorg/modules]]]),
>>> +                           [Default xorg module directory
>>> [[default=$moduledir/xorg/modules]]]),
>>>             [moduledir="$withval"],
>>> -            [moduledir="$libdir/xorg/modules"])
>>> +            [moduledir=`$PKG_CONFIG --variable=moduledir xorg-server`])
>>>  AC_ARG_ENABLE(dri, AC_HELP_STRING([--disable-dri],
>>>                                   [Disable DRI support
>>> [[default=auto]]]),
>>> --
>>> My assumption is that the drivers can only be loaded if they are located
>>> in the running server xorg/modules/drivers directory that it knows
>>> about at configuration time. If that is correct, the only value that
>>> with-xorg-module-dir can be given is the value that the server returns
>>> through the xorg-server .pc file.
>> You can set the module path with -modulepath on the command line or
>> ModulePath in a Files section in xorg.conf.
>> I wasn't aware of that. It's an additional workaround for a bad default
>> value.
>> So, you can definitely
>> handle drivers that are in a different prefix. More problematic, this
>> will break distcheck unless you set it back under $prefix with
>> DISTCHECK_CONFIGURE_FLAGS. This is like the chat we had about drivers
>> installing headers outside the xorg $includedir (which we might want
>> to revisit since it's doing the opposite unnecessarily).
>> I think this issue with distcheck (which fails for a user without write
>> permission in moduledir) is quite
>> exaggerated. All instructions I have seen on the net for people installing
>> drivers require them to have root password.
>> For someone who is creating a tarball to be published to others, it's the
>> least to ask. Running this
>> target is mandatory, there are other ways of testing.
> I would agree that it's a not a very useful feature, but that's what
> distcheck does. And we want distcheck to pass so that people rely on
> it when they make tarballs. It's like adding code workarounds for
> compiler warnings so that the important warnings don't get lost in the
> noise.
> I am a big supporter of distcheck. I fixed it in several packages.
>> In any case, there 5 easy workarounds for distcheck:
> Yep, I'm just noting that your patches need to have one because
> breaking distcheck is not OK.
> Only for those who don't have write permissions in the modules directory.
>> - configure the driver package with moduledir=<some comfy location> and
>> then
>> run distcheck.
>> - configure the driver package with libdir=<some comfy location> and then
>> run distcheck.
>> --with-xorg-module-dir='$${libdir}/xorg/modules'.
> I'd prefer this since it's the most foolproof.
> Agreed
>> - we add DISTCHECK_CONFIGURE_FLAGS = --libdir='$${libdir}/xorg/modules'.
>> - run 'make all dist distcheckclean' in a VPATH build which would be the
>> exact equivalent of distcheck.
>> The question remains: would `$PKG_CONFIG --variable=moduledir xorg-server`
>> not be a "better" default option?
>> - The configuration would not fail when different prefixes are used for
>> driver and xserver (without config swicth)
>> - Thousands of people would no longer be forced to hunt for and supply the
>> correct driver location
>> - All drivers could be build with no additional configure switches
>> - With one workaround above, the few people creating tarball without
>> password would not be affected.
>> Example of instructions found on the net:
>> ./configure --with-xorg-module-dir=/usr/lib/xorg/modules
>>         make && sudo make install
> I don't feel that strongly about the value as long as it doesn't break
> things. I can see arguments in either direction.
> Then there is no point in changing it.

That's just my opinion. Someone else might feel more strongly that
they like it one way or the other. I just hijacked this thread into a
conversation about making sure distcheck. Sorry. :)


More information about the xorg-devel mailing list