diff options
-rw-r--r-- | configure.ac | 24 | ||||
-rw-r--r-- | src/Makefile.am | 2 |
2 files changed, 15 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 diff --git a/src/Makefile.am b/src/Makefile.am index 6b44742e..57007cd4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -32,6 +32,8 @@ R128_DRI_SRCS = r128_dri.c RADEON_DRI_SRCS = radeon_dri.c endif +AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ + ati_drv_la_LTLIBRARIES = ati_drv.la ati_drv_la_LDFLAGS = -module -avoid-version ati_drv_ladir = @moduledir@/drivers |