diff options
author | Kristian Høgsberg <krh@redhat.com> | 2008-12-03 11:22:38 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2008-12-03 11:22:38 -0500 |
commit | 110a71d11ab7a1a55a6a24d792457fdef0b0746d (patch) | |
tree | ef71f8b0d99e625210458319a1135bca2a0804b7 | |
parent | fd2d40b7ec5d685dac55453eb1f2da672dc83126 (diff) |
Test for DRI2 extension in dri_internal.h and only enable AIGLX DRI2 if found.
-rw-r--r-- | configure.ac | 22 | ||||
-rw-r--r-- | glx/Makefile.am | 4 |
2 files changed, 24 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 13da45e8c..be1e7a56d 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -877,6 +877,28 @@ if test "x$DRI" = xyes || test "x$DRI2" = xyes; then | |||
877 | AC_SUBST(LIBDRM_LIBS) | 877 | AC_SUBST(LIBDRM_LIBS) |
878 | fi | 878 | fi |
879 | 879 | ||
880 | if test "x$DRI2" = xyes; then | ||
881 | save_CFLAGS=$CFLAGS | ||
882 | CFLAGS="$GL_CFLAGS $LIBDRM_CFLAGS -Wall" | ||
883 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <GL/gl.h> | ||
884 | #include <GL/internal/dri_interface.h> | ||
885 | #ifndef __DRI_DRI2 | ||
886 | #error DRI2 extension not available. | ||
887 | #endif]])], | ||
888 | [HAVE_DRI2EXTENSION=yes], | ||
889 | [HAVE_DRI2EXTENSION=no]) | ||
890 | CFLAGS=$save_CFLAGS | ||
891 | if test "x$HAVE_DRI2EXTENSION" = xyes; then | ||
892 | AC_DEFINE(DRI2_AIGLX, 1, [Build DRI2 AIGLX loader]) | ||
893 | DRI2_AIGLX=yes | ||
894 | else | ||
895 | AC_MSG_NOTICE([DRI2 AIGLX disabled, __DRI_DRI2 not defined in dri_interface.h.]) | ||
896 | DRI2_AIGLX=no | ||
897 | fi | ||
898 | fi | ||
899 | AM_CONDITIONAL(DRI2_AIGLX, test "x$DRI2_AIGLX" == xyes) | ||
900 | |||
901 | |||
880 | AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes]) | 902 | AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes]) |
881 | if test "x$XINERAMA" = xyes; then | 903 | if test "x$XINERAMA" = xyes; then |
882 | AC_DEFINE(XINERAMA, 1, [Support Xinerama extension]) | 904 | AC_DEFINE(XINERAMA, 1, [Support Xinerama extension]) |
diff --git a/glx/Makefile.am b/glx/Makefile.am index 8c705a74f..bec35bf21 100644 --- a/glx/Makefile.am +++ b/glx/Makefile.am | |||
@@ -24,7 +24,7 @@ INCLUDES = \ | |||
24 | -I$(top_srcdir)/hw/xfree86/dri \ | 24 | -I$(top_srcdir)/hw/xfree86/dri \ |
25 | -I$(top_srcdir)/mi | 25 | -I$(top_srcdir)/mi |
26 | 26 | ||
27 | if DRI2 | 27 | if DRI2_AIGLX |
28 | INCLUDES += -I$(top_srcdir)/hw/xfree86/dri2 | 28 | INCLUDES += -I$(top_srcdir)/hw/xfree86/dri2 |
29 | endif | 29 | endif |
30 | 30 | ||
@@ -53,7 +53,7 @@ libglxdri_la_SOURCES = \ | |||
53 | extension_string.c \ | 53 | extension_string.c \ |
54 | extension_string.h | 54 | extension_string.h |
55 | 55 | ||
56 | if DRI2 | 56 | if DRI2_AIGLX |
57 | libglxdri_la_SOURCES += glxdri2.c | 57 | libglxdri_la_SOURCES += glxdri2.c |
58 | endif | 58 | endif |
59 | 59 | ||