[PATCH v5 xserver] config: declare xserver private dependencies in xorg-server.pc
Dan Nicholson
dbn.lists at gmail.com
Wed Jun 16 08:45:57 PDT 2010
On Wed, Jun 16, 2010 at 6:18 AM, Gaetan Nadon <memsize at videotron.ca> wrote:
> Any module (drivers) depending on xserver also depends on some of the
> server private dependencies. Any driver including xf86.h depends on
> xext, kbproto, inputproto and randr.
>
> These dependencies are in separate packages, so anything can happen,
> removal, wrong version, etc... and the driver fails during compilation.
> Having the private dependencies declared will ensure all packages the
> server depends on are present and at the correct version.
>
> Currently each module attempts to check for server dependencies with
> various degrees of accuracy. With this patch, the driver will only need
> to check for its own explicit dependencies.
>
> Now that xproto is included in Requires.private it is removed from Requires.
> All the cflags from both Requires and Requires.private are returned
> to caller to pkg-config.
>
> Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>
> Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
> ---
> configure.ac | 14 +++++++++++++-
> xorg-server.pc.in | 3 ++-
> 2 files changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 4ada8f5..a7b2c30 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -793,9 +793,14 @@ WINDOWSWMPROTO="windowswmproto"
> APPLEWMPROTO="applewmproto >= 1.4"
>
> dnl Core modules for most extensions, et al.
> -REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.11] [fixesproto >= 4.1] [damageproto >= 1.1] [xcmiscproto >= 1.2.0] [xextproto >= 7.0.99.3] [xproto >= 7.0.17] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] fontsproto [inputproto >= 1.9.99.902] [kbproto >= 1.0.3]"
> +SDK_REQUIRED_MODULES="[xproto >= 7.0.17] [randrproto >= 1.2.99.3] [renderproto >= 0.11] [xextproto >= 7.0.99.3] [inputproto >= 1.9.99.902] [kbproto >= 1.0.3] fontsproto"
> +REQUIRED_MODULES="[fixesproto >= 4.1] [damageproto >= 1.1] [xcmiscproto >= 1.2.0] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] $SDK_REQUIRED_MODULES"
> REQUIRED_LIBS="xfont xau"
>
> +# Make required and optional modules available for inclusion in xorg-server.pc
> +AC_SUBST(SDK_REQUIRED_MODULES)
> +AC_SUBST(SDK_OPTIONAL_MODULES)
Since the reason for these variables is to populate the pkg-config
Requires field, I don't think it makes sense to have an "optional"
version. When you call "pkg-config --cflags xorg-server", the module
will be required. So, I'd just put everything under
SDK_REQUIRED_MODULES. SDK_OPTIONAL_MODULES is misleading since it
seems to mean "optional in the build" and modules are required once
they're exposed by the sdk.
In other words, if you've built the server such that the DRI2
extension is enabled _and_ dri2proto datatypes/protocal are exposed in
the sdk headers, then the module is required by xorg-server.
Also, we only want to add modules to Requires that are explicitly
exposed by the sdk. If a driver decides it needs a specific API that's
not exposed by the xorg sdk, then it should handle that itself.
Thanks for grovelling through all the drivers, though. It's definitely
good to know what APIs are actually in use.
--
Dan
More information about the xorg-devel
mailing list