Skip to content

Commit 32c706c

Browse files
memsizekeith-packard
authored andcommitted
config: declare xserver private dependencies in xorg-server.pc
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 <[email protected]> Signed-off-by: Gaetan Nadon <[email protected]> Signed-off-by: Keith Packard <[email protected]>
1 parent 37734ba commit 32c706c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

configure.ac

+8-1
Original file line numberDiff line numberDiff line change
@@ -793,9 +793,13 @@ WINDOWSWMPROTO="windowswmproto"
793793
APPLEWMPROTO="applewmproto >= 1.4"
794794

795795
dnl Core modules for most extensions, et al.
796-
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]"
796+
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"
797+
REQUIRED_MODULES="[fixesproto >= 4.1] [damageproto >= 1.1] [xcmiscproto >= 1.2.0] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] $SDK_REQUIRED_MODULES"
797798
REQUIRED_LIBS="xfont xau"
798799

800+
# Make SDK_REQUIRED_MODULES available for inclusion in xorg-server.pc
801+
AC_SUBST(SDK_REQUIRED_MODULES)
802+
799803
dnl List of libraries that require a specific version
800804
LIBAPPLEWM="applewm >= 1.4"
801805
LIBDMX="dmx >= 1.0.99.1"
@@ -947,6 +951,7 @@ if test "x$XV" = xyes; then
947951
AC_DEFINE(XV, 1, [Support Xv extension])
948952
AC_DEFINE(XvExtension, 1, [Build Xv extension])
949953
REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO"
954+
SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $VIDEOPROTO"
950955
else
951956
XVMC=no
952957
fi
@@ -1036,6 +1041,7 @@ case "$DRI2,$HAVE_DRI2PROTO" in
10361041
yes,yes | auto,yes)
10371042
AC_DEFINE(DRI2, 1, [Build DRI2 extension])
10381043
DRI2=yes
1044+
SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI2PROTO"
10391045
;;
10401046
esac
10411047
AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes)
@@ -1074,6 +1080,7 @@ if test "x$XINERAMA" = xyes; then
10741080
AC_DEFINE(XINERAMA, 1, [Support Xinerama extension])
10751081
AC_DEFINE(PANORAMIX, 1, [Internal define for Xinerama])
10761082
REQUIRED_MODULES="$REQUIRED_MODULES $XINERAMAPROTO"
1083+
SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $XINERAMAPROTO"
10771084
fi
10781085

10791086
AM_CONDITIONAL(XACE, [test "x$XACE" = xyes])

xorg-server.pc.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ abi_extension=@abi_extension@
1515
Name: xorg-server
1616
Description: Modular X.Org X Server
1717
Version: @PACKAGE_VERSION@
18-
Requires: pixman-1 pciaccess xproto >= 7.0.17
18+
Requires: pixman-1 pciaccess
19+
Requires.private: @SDK_REQUIRED_MODULES@
1920
Cflags: -I${sdkdir} @symbol_visibility@
2021
Libs: -L${libdir}

0 commit comments

Comments
 (0)