[RFC xserver] Require all-in-one xproto

Yaakov (Cygwin/X) yselkowitz at users.sourceforge.net
Thu Apr 8 19:26:58 PDT 2010


From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

xproto-7.2 ships with all protos supported by the server, so we can
simplify configure by removing a number of conditionals that were based
on whether certain protos are installed or not.

Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
---
DO NOT PULL/MERGE THIS PATCH YET!!

This is just an example of how a merged xproto will affect configure.  
This depends on xcalibrateproto being restored to xproto (mentioned in 
IRC) and still needs to be tested once merged xproto is released.

 configure.ac                |   66 ++++++------------------------------------
 glx/Makefile.am             |    1 -
 hw/kdrive/ephyr/Makefile.am |    1 -
 hw/xfree86/dri/Makefile.am  |    2 +-
 hw/xfree86/dri2/Makefile.am |    2 +-
 5 files changed, 12 insertions(+), 60 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2f761c1..613e1d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -628,15 +628,15 @@ AC_ARG_ENABLE(xres,           AS_HELP_STRING([--disable-xres], [Build XRes exten
 AC_ARG_ENABLE(record,         AS_HELP_STRING([--enable-record], [Build Record extension (default: disabled)]), [RECORD=$enableval], [RECORD=no])
 AC_ARG_ENABLE(xv,             AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes])
 AC_ARG_ENABLE(xvmc,           AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes])
-AC_ARG_ENABLE(dga,            AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto])
+AC_ARG_ENABLE(dga,            AS_HELP_STRING([--disable-dga], [Build DGA extension (default: enabled)]), [DGA=$enableval], [DGA=yes])
 AC_ARG_ENABLE(screensaver,    AS_HELP_STRING([--disable-screensaver], [Build ScreenSaver extension (default: enabled)]), [SCREENSAVER=$enableval], [SCREENSAVER=yes])
 AC_ARG_ENABLE(xdmcp,          AS_HELP_STRING([--disable-xdmcp], [Build XDMCP extension (default: auto)]), [XDMCP=$enableval], [XDMCP=auto])
 AC_ARG_ENABLE(xdm-auth-1,     AS_HELP_STRING([--disable-xdm-auth-1], [Build XDM-Auth-1 extension (default: auto)]), [XDMAUTH=$enableval], [XDMAUTH=auto])
 AC_ARG_ENABLE(glx,            AS_HELP_STRING([--disable-glx], [Build GLX extension (default: enabled)]), [GLX=$enableval], [GLX=yes])
 AC_ARG_ENABLE(dri,            AS_HELP_STRING([--enable-dri], [Build DRI extension (default: auto)]), [DRI=$enableval])
-AC_ARG_ENABLE(dri2,           AS_HELP_STRING([--enable-dri2], [Build DRI2 extension (default: auto)]), [DRI2=$enableval], [DRI2=auto])
+AC_ARG_ENABLE(dri2,           AS_HELP_STRING([--enable-dri2], [Build DRI2 extension (default: enabled)]), [DRI2=$enableval], [DRI2=yes])
 AC_ARG_ENABLE(xinerama,	      AS_HELP_STRING([--disable-xinerama], [Build Xinerama extension (default: enabled)]), [XINERAMA=$enableval], [XINERAMA=yes])
-AC_ARG_ENABLE(xf86vidmode,    AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: auto)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=auto])
+AC_ARG_ENABLE(xf86vidmode,    AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: enabled)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=yes])
 AC_ARG_ENABLE(xace,           AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes])
 AC_ARG_ENABLE(xselinux,       AS_HELP_STRING([--disable-xselinux], [Build SELinux extension (default: disabled)]), [XSELINUX=$enableval], [XSELINUX=no])
 AC_ARG_ENABLE(xcsecurity,     AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: disabled)]), [XCSECURITY=$enableval], [XCSECURITY=no])
@@ -785,26 +785,8 @@ XEXT_INC='-I$(top_srcdir)/Xext'
 XEXT_LIB='$(top_builddir)/Xext/libXext.la'
 XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
 
-dnl Optional modules
-VIDEOPROTO="videoproto"
-COMPOSITEPROTO="compositeproto >= 0.4"
-RECORDPROTO="recordproto >= 1.13.99.1"
-SCRNSAVERPROTO="scrnsaverproto >= 1.1"
-RESOURCEPROTO="resourceproto"
-DRIPROTO="xf86driproto >= 2.1.0"
-DRI2PROTO="dri2proto >= 2.2"
-XINERAMAPROTO="xineramaproto"
-BIGFONTPROTO="xf86bigfontproto >= 1.2.0"
-XCALIBRATEPROTO="xcalibrateproto"
-DGAPROTO="xf86dgaproto >= 2.0.99.1"
-GLPROTO="glproto >= 1.4.10"
-DMXPROTO="dmxproto >= 2.2.99.1"
-VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1"
-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.13] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] fontsproto [inputproto >= 1.9.99.902] [kbproto >= 1.0.3]"
+REQUIRED_MODULES="[xproto >= 7.1.99.1] [xtrans >= 1.2.2]"
 REQUIRED_LIBS="xfont xau [pixman-1 >= 0.15.20]"
 
 dnl List of libraries that require a specific version
@@ -951,7 +933,6 @@ AM_CONDITIONAL(XV, [test "x$XV" = xyes])
 if test "x$XV" = xyes; then
 	AC_DEFINE(XV, 1, [Support Xv extension])
 	AC_DEFINE(XvExtension, 1, [Build Xv extension])
-	REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO"
 else
 	XVMC=no
 fi
@@ -969,7 +950,6 @@ fi
 AM_CONDITIONAL(COMPOSITE, [test "x$COMPOSITE" = xyes])
 if test "x$COMPOSITE" = xyes; then
 	AC_DEFINE(COMPOSITE, 1, [Support Composite Extension])
-	REQUIRED_MODULES="$REQUIRED_MODULES $COMPOSITEPROTO"
 	COMPOSITE_LIB='$(top_builddir)/composite/libcomposite.la'
 	COMPOSITE_INC='-I$(top_srcdir)/composite'
 fi
@@ -983,25 +963,22 @@ fi
 AM_CONDITIONAL(RECORD, [test "x$RECORD" = xyes])
 if test "x$RECORD" = xyes; then
 	AC_DEFINE(XRECORD, 1, [Support Record extension])
-	REQUIRED_MODULES="$REQUIRED_MODULES $RECORDPROTO"
 	RECORD_LIB='$(top_builddir)/record/librecord.la'
 fi
 
 AM_CONDITIONAL(SCREENSAVER, [test "x$SCREENSAVER" = xyes])
 if test "x$SCREENSAVER" = xyes; then
 	AC_DEFINE(SCREENSAVER, 1, [Support MIT-SCREEN-SAVER extension])
-	REQUIRED_MODULES="$REQUIRED_MODULES $SCRNSAVERPROTO"
 fi
 
 AM_CONDITIONAL(RES, [test "x$RES" = xyes])
 if test "x$RES" = xyes; then
 	AC_DEFINE(RES, 1, [Support X resource extension])
-	REQUIRED_MODULES="$REQUIRED_MODULES $RESOURCEPROTO"
 fi
 
 if test "x$GLX" = xyes; then
 	PKG_CHECK_MODULES([XLIB], [x11])
-	PKG_CHECK_MODULES([GL], $GLPROTO $LIBGL)
+	PKG_CHECK_MODULES([GL], $LIBGL)
 	AC_SUBST(XLIB_CFLAGS)
 	AC_DEFINE(GLXEXT, 1, [Build GLX extension])
 	GLX_LIBS='$(top_builddir)/glx/libglx.la'
@@ -1027,18 +1004,11 @@ AC_SUBST([GLX_DEFINES])
 AM_CONDITIONAL(DRI, test "x$DRI" = xyes)
 if test "x$DRI" = xyes; then
 	AC_DEFINE(XF86DRI, 1, [Build DRI extension])
-	PKG_CHECK_MODULES([DRIPROTO], [$DRIPROTO])
-	PKG_CHECK_MODULES([DRI], $GLPROTO $LIBDRI)
-	AC_SUBST(DRIPROTO_CFLAGS)
+	PKG_CHECK_MODULES([DRI], $LIBDRI)
 fi
 
-PKG_CHECK_MODULES([DRI2PROTO], $DRI2PROTO,
-                  [HAVE_DRI2PROTO=yes], [HAVE_DRI2PROTO=no])
-case "$DRI2,$HAVE_DRI2PROTO" in
-	yes,no)
-		AC_MSG_ERROR([DRI2 requested, but dri2proto not found.])
-		;;
-	yes,yes | auto,yes)
+case "$DRI2" in
+	yes | auto)
 		AC_DEFINE(DRI2, 1, [Build DRI2 extension])
 		DRI2=yes
 		;;
@@ -1077,7 +1047,6 @@ AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes])
 if test "x$XINERAMA" = xyes; then
 	AC_DEFINE(XINERAMA, 1, [Support Xinerama extension])
 	AC_DEFINE(PANORAMIX, 1, [Internal define for Xinerama])
-	REQUIRED_MODULES="$REQUIRED_MODULES $XINERAMAPROTO"
 fi
 
 AM_CONDITIONAL(XACE, [test "x$XACE" = xyes])
@@ -1108,7 +1077,6 @@ fi
 AM_CONDITIONAL(MULTIBUFFER, [test "x$MULTIBUFFER" = xyes])
 if test "x$MULTIBUFFER" = xyes; then
 	AC_DEFINE(MULTIBUFFER, 1, [Build Multibuffer extension])
-	# Requires xextproto which is always required
 fi
 
 AM_CONDITIONAL(DBE, [test "x$DBE" = xyes])
@@ -1120,7 +1088,6 @@ fi
 AM_CONDITIONAL(XF86BIGFONT, [test "x$XF86BIGFONT" = xyes])
 if test "x$XF86BIGFONT" = xyes; then
 	AC_DEFINE(XF86BIGFONT, 1, [Support XF86 Big font extension])
-	REQUIRED_MODULES="$REQUIRED_MODULES $BIGFONTPROTO"
 fi
 
 AM_CONDITIONAL(DPMSExtension, [test "x$DPMSExtension" = xyes])
@@ -1130,7 +1097,6 @@ fi
 
 if test "x$XCALIBRATE" = xyes && test "$KDRIVE" = yes; then
    AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension])
-   REQUIRED_MODULES="$REQUIRED_MODULES $XCALIBRATEPROTO"
 else
    XCALIBRATE=no
 fi
@@ -1750,9 +1716,6 @@ if test "x$XORG" = xyes; then
 	if test "x$XORG_OS_PCI" = x ; then
 		XORG_OS_PCI=$XORG_OS
 	fi
-	if test "x$DGA" = xauto; then
-		PKG_CHECK_MODULES(DGA, $DGAPROTO, [DGA=yes], [DGA=no])
-	fi
 	if test "x$DGA" = xyes; then
 		XORG_MODULES="$XORG_MODULES $DGAPROTO"
 		PKG_CHECK_MODULES(DGA, $DGAPROTO)
@@ -1760,12 +1723,8 @@ if test "x$XORG" = xyes; then
 		AC_DEFINE(XFreeXDGA, 1, [Build XDGA support])
 	fi
 
-	if test "x$XF86VIDMODE" = xauto; then
-		PKG_CHECK_MODULES(XF86VIDMODE, $VIDMODEPROTO, [XF86VIDMODE=yes], [XF86VIDMODE=no])
-	fi
 	if test "x$XF86VIDMODE" = xyes; then
 		XORG_MODULES="$XORG_MODULES $VIDMODEPROTO"
-		PKG_CHECK_MODULES(XF86VIDMODE, $VIDMODEPROTO)
 		AC_DEFINE(XF86VIDMODE, 1, [Support XFree86 Video Mode extension])
 	fi
 
@@ -1873,12 +1832,7 @@ if test "x$XWIN" = xyes; then
 
 	PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau xfont])
 
-	if test "x$WINDOWSWM" = xauto; then
-		PKG_CHECK_EXISTS($WINDOWSWMPROTO, [WINDOWSWM=yes], [WINDOWSWM=no])
-	fi
 	if test "x$WINDOWSWM" = xyes ; then
-		PKG_CHECK_MODULES(WINDOWSWM, $WINDOWSWMPROTO)
-		XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS $WINDOWSWM_CFLAGS"
 		AC_DEFINE(ROOTLESS,1,[Build Rootless code])
 	fi
 
@@ -1931,7 +1885,7 @@ if test "x$XQUARTZ" = xyes; then
 
 	CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA"
 
-	PKG_CHECK_MODULES(XPBPROXY, $APPLEWMPROTO $LIBAPPLEWM xfixes x11)
+	PKG_CHECK_MODULES(XPBPROXY, $LIBAPPLEWM xfixes x11)
 
         if test "x$XQUARTZ_SPARKLE" = xyes ; then
                 AC_DEFINE(XQUARTZ_SPARKLE,1,[Support application updating through sparkle.])
@@ -1960,7 +1914,7 @@ AM_CONDITIONAL(STANDALONE_XPBPROXY, [test "x$STANDALONE_XPBPROXY" = xyes])
 dnl DMX DDX
 PKG_CHECK_MODULES(
 	[DMXMODULES],
-	[xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES],
+	[xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI xau $XDMCP_MODULES],
 	[PKG_CHECK_MODULES(
 		[XDMXCONFIG_DEP],
 		[xaw7 xmu xt xpm x11],
diff --git a/glx/Makefile.am b/glx/Makefile.am
index eb0c533..eede689 100644
--- a/glx/Makefile.am
+++ b/glx/Makefile.am
@@ -10,7 +10,6 @@ AM_CFLAGS = \
 	@DRI_CFLAGS@ \
 	@XLIB_CFLAGS@ \
 	@LIBDRM_CFLAGS@ \
-	@DRIPROTO_CFLAGS@ \
 	-DXFree86Server \
 	@GLX_DEFINES@ \
 	@GLX_ARCH_DEFINES@
diff --git a/hw/kdrive/ephyr/Makefile.am b/hw/kdrive/ephyr/Makefile.am
index 8646703..c015795 100644
--- a/hw/kdrive/ephyr/Makefile.am
+++ b/hw/kdrive/ephyr/Makefile.am
@@ -3,7 +3,6 @@ INCLUDES = 			\
 	@KDRIVE_CFLAGS@		\
 	@XEPHYR_INCS@		\
 	@XEPHYR_CFLAGS@		\
-	@DRIPROTO_CFLAGS@	\
 	-I$(top_srcdir)		\
 	-I$(top_srcdir)/exa
 
diff --git a/hw/xfree86/dri/Makefile.am b/hw/xfree86/dri/Makefile.am
index a7b491c..0a3cd19 100644
--- a/hw/xfree86/dri/Makefile.am
+++ b/hw/xfree86/dri/Makefile.am
@@ -9,7 +9,7 @@ libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \
                    -I$(top_srcdir)/hw/xfree86/os-support/bus \
                    -I$(top_srcdir)/glx \
                    -DHAVE_XORG_CONFIG_H \
-                   @DIX_CFLAGS@ @XORG_CFLAGS@ @DRIPROTO_CFLAGS@ \
+                   @DIX_CFLAGS@ @XORG_CFLAGS@ \
                    @LIBDRM_CFLAGS@ \
                    @DRI_CFLAGS@
 libdri_la_LDFLAGS = -module -avoid-version @LIBDRM_LIBS@
diff --git a/hw/xfree86/dri2/Makefile.am b/hw/xfree86/dri2/Makefile.am
index c9fdde2..2f79c3a 100644
--- a/hw/xfree86/dri2/Makefile.am
+++ b/hw/xfree86/dri2/Makefile.am
@@ -2,7 +2,7 @@ libdri2_la_LTLIBRARIES = libdri2.la
 libdri2_la_CFLAGS = \
 	-DHAVE_XORG_CONFIG_H \
 	@DRI_CFLAGS@ \
-	@DIX_CFLAGS@ @XORG_CFLAGS@ @DRI2PROTO_CFLAGS@ @LIBDRM_CFLAGS@ \
+	@DIX_CFLAGS@ @XORG_CFLAGS@ @LIBDRM_CFLAGS@ \
 	-I$(top_srcdir)/hw/xfree86/common \
 	-I$(top_srcdir)/hw/xfree86/os-support/bus
 
-- 
1.6.6.1



More information about the xorg-devel mailing list