summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-06-03 15:48:55 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-06-03 15:52:02 +0100
commit08148896196443a8582c30b47ff546acca78d69c (patch)
tree9f48ed24a5c12b4d1e98449bd140765087d74e34
parent0c81041e9b42f9df0c86c88c8648dd20ed26d0ab (diff)
configure: XORG_DRIVER_CHECK_EXT does not create CFLAGS/LIBS variables
XORG_DRIVER_CHECK_EXT only adds the package name to the list of REQUIRED_MODULES (which is later passed to pkg-config). For our optional dependencies, we must do a later call to pkg-config to verify the package is available and then remember to include the includes with the CFLAGS. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--configure.ac17
1 files changed, 10 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index d3ee4123..9aeeb813 100644
--- a/configure.ac
+++ b/configure.ac
@@ -513,7 +513,7 @@ if test "x$DRI" != "xno"; then
XORG_DRIVER_CHECK_EXT(DRI3, dri3proto)
if test "x$_EXT_CHECK" != "xno"; then
- DRI3=$DRI
+ PKG_CHECK_MODULES(DRI3, [dri3proto], [DRI3=$DRI], [])
fi
if test "x$DRI3" != "xno"; then
save_CFLAGS=$CFLAGS
@@ -557,21 +557,24 @@ fi
AC_CHECK_HEADERS([X11/extensions/dpmsconst.h])
-has_present="no"
+PRESENT="no"
XORG_DRIVER_CHECK_EXT(PRESENT, presentproto)
if test "x$_EXT_CHECK" != "xno"; then
+ PKG_CHECK_MODULES(PRESENT, [presentproto], [PRESENT="yes"], [])
+fi
+if test "x$PRESENT" != "xno"; then
save_CFLAGS=$CFLAGS
- CFLAGS=$XORG_CFLAGS
- AC_CHECK_HEADERS([present.h], [has_present="yes"], [], [
+ CFLAGS="$XORG_CFLAGS $PRESENT_CFLAGS"
+ AC_CHECK_HEADERS([present.h], [], [PRESENT="no"], [
#include <xorg-server.h>
#include <xf86str.h>
])
CFLAGS=$save_CFLAGS
fi
AC_MSG_CHECKING([whether to include PRESENT support])
-AM_CONDITIONAL(PRESENT, test "x$has_present" != "xno")
-AC_MSG_RESULT([$has_present])
-if test "x$has_present" != "xno"; then
+AM_CONDITIONAL(PRESENT, test "x$PRESENT" != "xno")
+AC_MSG_RESULT([$PRESENT])
+if test "x$PRESENT" != "xno"; then
AC_DEFINE(HAVE_PRESENT,1,[Enable PRESENT driver support])
dri_msg="$dri_msg Present"
fi