From d627592a57cd8d961c597eed58e038327328f38a Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Mon, 4 Apr 2016 20:19:01 +0000 Subject: Fix EXA detection. As of 1.17.2, the xserver is more picky about the order in which headers are included. We need to account for this in order for the compile time exa.h check to succeed. --- driver/xf86-video-cirrus/configure.ac | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/driver/xf86-video-cirrus/configure.ac b/driver/xf86-video-cirrus/configure.ac index 0b6eefb68..c2dd3da1e 100644 --- a/driver/xf86-video-cirrus/configure.ac +++ b/driver/xf86-video-cirrus/configure.ac @@ -61,6 +61,8 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) # Obtain compiler/linker options for the driver dependencies PKG_CHECK_MODULES(XORG, [xorg-server >= 1.4 xproto fontsproto $REQUIRED_MODULES]) +sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` + # Checks for libraries. SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" @@ -81,7 +83,9 @@ if test "x$XAA" != xno; then save_CPPFLAGS=$CPPFLAGS CFLAGS=$XORG_CFLAGS CPPFLAGS="$XORG_CFLAGS" - AC_CHECK_HEADERS([xaa.h], XAA=yes, XAA=no) + AC_CHECK_HEADERS([xaa.h], XAA=yes, XAA=no, [ +#include +]) CFLAGS=$save_CFLAGS CPPFLAGS=$save_CPPFLAGS fi @@ -99,12 +103,7 @@ CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" AC_MSG_CHECKING([whether to enable EXA support]) if test "x$EXA" = xyes; then AC_MSG_RESULT(yes) - - SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" - AC_CHECK_HEADER(exa.h, - [have_exa_h="yes"], [have_exa_h="no"]) - CPPFLAGS="$SAVE_CPPFLAGS" + AC_CHECK_FILE(${sdkdir}/exa.h, [have_exa_h="yes"], [have_exa_h="no"]) else AC_MSG_RESULT(no) fi @@ -114,6 +113,7 @@ CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" if test "x$have_exa_h" = xyes; then AC_MSG_CHECKING([whether EXA version is at least 2.0.0]) AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[ +#include #include "exa.h" #if EXA_VERSION_MAJOR < 2 #error OLD EXA! -- cgit v1.2.3