diff options
author | Luc Verhaegen <libv@skynet.be> | 2005-11-30 10:11:04 +0000 |
---|---|---|
committer | Luc Verhaegen <libv@skynet.be> | 2005-11-30 10:11:04 +0000 |
commit | 1c6c43fde31e6d00b2f06628d0653528afb67ca2 (patch) | |
tree | ef555e10a57eea9f86c73904c5b84bde34d7fab7 | |
parent | b6b8c303acdaf9979a3e42bc0905a324964c9f4f (diff) |
[devel-update_modular_XvExtension]
- Cleaner XvExtension handling:
- add an extra #define to config depending on XV
- check for xf86xv.h and xf86xvpriv.h for inclusion of via_video.o
- Import recent Xorg changes.
- configure.ac: don't build static (ajax)
- configure.ac: pkgcheck dependencies (kem)
- man/Makefile.am: update drivermandir (alanc)
-rw-r--r-- | README | 23 | ||||
-rw-r--r-- | configure.ac | 35 | ||||
-rw-r--r-- | man/Makefile.am | 2 | ||||
-rw-r--r-- | src/via_video.c | 3 |
4 files changed, 47 insertions, 16 deletions
@@ -38,7 +38,8 @@ http://lists.sourceforge.net/mailman/listinfo/unichrome-users first. 2) Modular X: - This is (of course) only suited for the X.org 7.x release. + This is (of course) only suited for the X.org 7.x release. Sadly, the + macros used in the current configure.ac require you to use at least RC2. Building against modular is a breeze. You should have everything installed for building drivers if and when you want to. @@ -50,10 +51,11 @@ http://lists.sourceforge.net/mailman/listinfo/unichrome-users first. # make # make install - One possible issue can exist here: aclocal might be unable to find the X - macros. You will see configure complain with: - ./configure: line 20518: XORG_MANPAGE_SECTIONS: command not found - ./configure: line 20519: XORG_RELEASE_VERSION: command not found + Possible issues: + aclocal might be unable to find the X macros. You will see configure + complain with: + ./configure: line xxxxx: XORG_MANPAGE_SECTIONS: command not found + ./configure: line xxxxx: XORG_RELEASE_VERSION: command not found What happens is that aclocal is unable to find your xorgversion.m4 and xorg-macros.m4. These are usually found in <prefix>/share/aclocal @@ -64,3 +66,14 @@ http://lists.sourceforge.net/mailman/listinfo/unichrome-users first. macros. - temporary solution: run # export ACLOCAL_LOCALDIR="<prefix>/share/aclocal/" + + Another possible issue is configure failing with: + ./configure: line xxxxx: syntax error near unexpected token `RANDR,' + ./configure: line xxxxx: `XORG_DRIVER_CHECK_EXT(RANDR, randrproto)' + The cause of this is that xorg-server.m4 isn't available. This was only + added a few days before 7.0RC2 was tagged, but it is quite incompatible + with earlier versions. So make sure you have at least RC2. + + If anyone with a lot of autoconf experience knows how to properly check + for the existence of individual macros at the autoheader stage, please + don't hesitate to contact me. diff --git a/configure.ac b/configure.ac index b3741b1..d9b1441 100644 --- a/configure.ac +++ b/configure.ac @@ -39,6 +39,7 @@ CFLAGS="$CFLAGS -Wall" AC_MSG_RESULT([$CFLAGS]) # Checks for programs. +AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC @@ -55,13 +56,14 @@ AC_ARG_ENABLE(dri, AC_HELP_STRING([--disable-dri], [DRI="$enableval"], [DRI=auto]) -AC_ARG_ENABLE(xv, AC_HELP_STRING([--disable-xv], - [Disable Xv support [[default=yes]]]), - [XV="$enableval"], - [XV=yes]) +# Checks for extensions +XORG_DRIVER_CHECK_EXT(RANDR, randrproto) +XORG_DRIVER_CHECK_EXT(RENDER, renderproto) +XORG_DRIVER_CHECK_EXT(XF86DRI, xextproto x11) +XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) # Checks for pkg-config packages -PKG_CHECK_MODULES(XORG, [xorg-server xproto]) +PKG_CHECK_MODULES(XORG, [xorg-server xproto fontsproto $REQUIRED_MODULES]) sdkdir=$(pkg-config --variable=sdkdir xorg-server) # Checks for libraries. @@ -97,16 +99,29 @@ if test "$DRI" = yes; then AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support]) fi -AM_CONDITIONAL(XV, test x$XV = xyes) -if test x$XV = xyes; then - AC_DEFINE(XvExtension,1,[Enable Xv driver support]) -fi - AC_DEFINE(X_USE_LINEARFB,1,[Compatibility define for older Xen]) AC_DEFINE(X_USE_REGION_NULL,1,[Compatibility define for older Xen]) AC_DEFINE(X_HAVE_XAAGETROP,1,[Compatibility define for older Xen]) AC_DEFINE(X_NEED_I2CSTART,1,[Compatibility define for older Xen]) +AC_CHECK_FILE([${sdkdir}/xf86xv.h], + [have_xf86xv_h="yes"], [have_xf86xv_h="no"]) +AC_CHECK_FILE([${sdkdir}/xf86xvpriv.h], + [have_xf86xvpriv_h="yes"], [have_xf86xvpriv_h="no"]) + +AC_MSG_CHECKING([whether to include XV support]) +if test "$have_xf86xv_h" = yes -a \ + "$have_xf86xvpriv_h" = yes; then + have_xv="yes" + AH_BOTTOM([/* Monolith has XvExtension, modular has only XV defined */ +#ifdef XV +#define XvExtension 1 +#endif]) +fi +AC_MSG_RESULT([$have_xv]) + +AM_CONDITIONAL(XV, test x$have_xv = xyes) + AC_SUBST([DRI_CFLAGS]) AC_SUBST([XORG_CFLAGS]) AC_SUBST([moduledir]) diff --git a/man/Makefile.am b/man/Makefile.am index a16ec06..27106a2 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -25,7 +25,7 @@ # from the copyright holders. # -drivermandir = $(mandir)/man$(DRIVER_MAN_SUFFIX) +drivermandir = $(DRIVER_MAN_DIR) driverman_SOURCES = @DRIVER_NAME@.man diff --git a/src/via_video.c b/src/via_video.c index dcf49c8..85a9c8c 100644 --- a/src/via_video.c +++ b/src/via_video.c @@ -27,6 +27,8 @@ #include "config.h" #endif +#ifdef XvExtension + #include "xf86.h" #include "xf86_OSproc.h" #include "xf86Resources.h" @@ -2336,3 +2338,4 @@ ViaVideoInit(ScrnInfoPtr pScrn, ScreenPtr pScreen) VIASetColorSpace(pVia); } +#endif /* XvExtension */ |