Add a configure option --with/--without-valgrind to be able to compile libdrm with or without valgrind. The latter was not possible if pkgconfig found the valgrind package. --- configure.ac | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 09fed53..0776320 100644 --- a/configure.ac +++ b/configure.ac @@ -292,8 +292,21 @@ fi AC_SUBST(PCIACCESS_CFLAGS) AC_SUBST(PCIACCESS_LIBS) -PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no]) -if test "x$have_valgrind" = "xyes"; then +AC_ARG_WITH(valgrind, + AS_HELP_STRING([--with-valgrind], + [Enable support for valgrind (default: auto)]), + [VALGRIND=$with_valgrind], [VALGRIND=auto]) + +if test "x$VALGRIND" = "xauto"; then + PKG_CHECK_MODULES(VALGRIND, [valgrind], [VALGRIND=yes], [VALGRIND=no]) +else + if test "x$VALGRIND" = "xyes"; then + VALGRIND=yes + else + VALGRIND=no + fi +fi +if test "x$VALGRIND" = "xyes"; then AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress false warnings]) fi @@ -340,6 +353,7 @@ echo "" echo "$PACKAGE_STRING will be compiled with:" echo "" echo " libkms $LIBKMS" +echo " valgrind $VALGRIND" echo " Intel API $INTEL" echo " vmwgfx API $VMWGFX" echo " Radeon API $RADEON" -- 1.7.2.5 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel