summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorKevin E Martin <kem@kem.org>2005-07-14 22:30:47 +0000
committerKevin E Martin <kem@kem.org>2005-07-14 22:30:47 +0000
commit2256fabf1cd69c950639f236f61e59e68cc8e6fa (patch)
tree2d79cce2bd5b71424766556eb7041381936f992c /configure.ac
parent520317863ffb365eca17c96b4d545adb554bbbd6 (diff)
Fix check for headers. Use {XORG,DRI}_CFLAGS subst instead of replacing
CFLAGS.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 13 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index ab16e69f..dee459a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,15 +61,19 @@ sdkdir=$(pkg-config --variable=sdkdir xorg-server)
AC_HEADER_STDC
if test "$DRI" != no; then
- CFLAGS="-I${sdkdir}"
- AC_CHECK_HEADERS([dri.h sarea.h dristruct.h])
+ 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"])
fi
AC_MSG_CHECKING([whether to include DRI support])
if test x$DRI = xauto; then
- if test "$ac_cv_header_dri_h" = yes -a \
- "$ac_cv_header_sarea_h" = yes -a \
- "$ac_cv_header_dristruct_h" = yes; then
+ if test "$have_dri_h" = yes -a \
+ "$have_sarea_h" = yes -a \
+ "$have_dristruct_h" = yes; then
DRI="yes"
else
DRI="no"
@@ -79,16 +83,14 @@ AC_MSG_RESULT([$DRI])
AM_CONDITIONAL(DRI, test x$DRI = xyes)
if test "$DRI" = yes; then
- PKG_CHECK_MODULES(DRI, [libdrm])
+ PKG_CHECK_MODULES(DRI, [libdrm xf86driproto])
AC_DEFINE(XF86DRI,1,[Enable DRI driver support])
AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
fi
-CFLAGS="$XORG_CFLAGS $DRI_CFLAGS"' -I$(top_srcdir)/src'
-
-AC_SUBST([CFLAGS])
-AC_SUBST(DRI)
-AC_SUBST(moduledir)
+AC_SUBST([XORG_CFLAGS])
+AC_SUBST([DRI_CFLAGS])
+AC_SUBST([moduledir])
AC_OUTPUT([
Makefile