summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorRémi Cardona <remi@gentoo.org>2009-10-28 12:37:38 +0100
committerOwain G. Ainsworth <oga@openbsd.org>2010-03-01 15:13:01 +0000
commitc2d312720105d44297a6ebe26123be0eb3571645 (patch)
tree12dd7d131c7574c9b7fe06ed3b1bd0e930ccef5f /configure.ac
parenta8f845423703842ae85cc5c50bf28f1e3b69e668 (diff)
configure: make --disable-dri work even if the server supports DRI
XF86DRI is defined by the SDK so not defining it here just breaks the build. Define HAVE_DRI instead to avoid collisions. Note: DRI2 is still enabled/disabled entirely by SDK defines. Signed-off-by: Rémi Cardona <remi@gentoo.org> Acked-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit a851139c2141f6da370186148f2836e18b2acf83) Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac35
1 files changed, 6 insertions, 29 deletions
diff --git a/configure.ac b/configure.ac
index a361149f..7d4cea3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,7 +93,7 @@ AC_ARG_ENABLE(kms-only, AC_HELP_STRING([--enable-kms-only],
XORG_DRIVER_CHECK_EXT(XINERAMA, xineramaproto)
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
-XORG_DRIVER_CHECK_EXT(XF86DRI, xextproto x11)
+XORG_DRIVER_CHECK_EXT(XF86DRI, xextproto x11 xf86driproto glproto)
XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
# Checks for pkg-config packages
@@ -107,30 +107,15 @@ AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
-save_CFLAGS="$CFLAGS"
-CFLAGS="$XORG_CFLAGS $DRI_CFLAGS $DRM_CFLAGS"
-CPPFLAGS="$XORG_CFLAGS $DRI_CFLAGS $DRM_CFLAGS"
-AC_MSG_CHECKING([whether to include DRI support])
if test x$DRI != xno; then
- AC_CHECK_FILE([${sdkdir}/dri.h],
- [have_dri_h="yes"], [have_dri_h="no"])
- AC_CHECK_FILE([${sdkdir}/sarea.h],
- [have_sarea_h="yes"], [have_sarea_h="no"])
- AC_CHECK_FILE([${sdkdir}/dristruct.h],
- [have_dristruct_h="yes"], [have_dristruct_h="no"])
+ AC_CHECK_FILES([${sdkdir}/dri.h ${sdkdir}/sarea.h ${sdkdir}/dristruct.h],
+ [DRI="yes"
+ AC_DEFINE(HAVE_DRI,1,[Enable DRI driver support])],
+ [DRI="no"])
fi
+AM_CONDITIONAL(DRI, test x$DRI = xyes)
AC_MSG_CHECKING([whether to include DRI support])
-if test x$DRI = xauto; then
- if test "$have_dri_h" = yes -a \
- "$have_sarea_h" = yes -a \
- "$have_dristruct_h" = yes; then
- DRI="yes"
- else
- DRI="no"
- fi
-fi
AC_MSG_RESULT([$DRI])
-CFLAGS="$save_CFLAGS $DEBUGFLAGS"
dnl Use lots of warning flags with GCC
@@ -142,13 +127,6 @@ if test "x$GCC" = "xyes"; then
-Wnested-externs -fno-strict-aliasing"
fi
-AM_CONDITIONAL(DRI, test x$DRI = xyes)
-if test "$DRI" = yes; then
- PKG_CHECK_MODULES(DRI, [xf86driproto glproto])
- AC_DEFINE(XF86DRI,1,[Enable DRI driver support])
- AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
-fi
-
AM_CONDITIONAL(VIDEO_DEBUG, test x$VIDEO_DEBUG = xyes)
if test "$VIDEO_DEBUG" = yes; then
AC_DEFINE(VIDEO_DEBUG,1,[Enable debug support])
@@ -170,7 +148,6 @@ if test "$KMS_ONLY" = yes; then
AC_DEFINE(KMS_ONLY,1,[Assume KMS support])
fi
-AC_SUBST([DRI_CFLAGS])
AC_SUBST([XORG_CFLAGS])
AC_SUBST([WARN_CFLAGS])
AC_SUBST([moduledir])