[PATCH 1/4] drm: Add config for detecting libdrm

Patrik Jakobsson patrik.jakobsson at linux.intel.com
Tue Jun 9 11:26:41 UTC 2015


Use pkg-config to try to find libdrm. If that fails use the standard
include directory for kernel drm headers in /usr/include/drm.

Signed-off-by: Patrik Jakobsson <patrik.jakobsson at linux.intel.com>
---
 configure.ac | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure.ac b/configure.ac
index d829e18..ea3b6e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -837,6 +837,10 @@ fi
 AM_CONDITIONAL([USE_LIBUNWIND], [test "x$use_libunwind" = xyes])
 AC_MSG_RESULT([$use_libunwind])
 
+PKG_CHECK_MODULES([libdrm], [libdrm],
+	[CPPFLAGS="$CPPFLAGS $libdrm_CFLAGS"],
+	[CPPFLAGS="$CPPFLAGS -I/usr/include/drm"])
+
 if test "$arch" = mips && test "$no_create" != yes; then
 	mkdir -p linux/mips
 	if $srcdir/linux/mips/genstub.sh linux/mips; then
-- 
2.1.0





More information about the Strace-devel mailing list