Add configure option --with/--without-valgrind
PATCH 1/1 Add configure option --with/--without-valgrind
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(-)
configure.ac +16 -2
@@ -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"
Signature · 1 line
1.7.2.5
Quoted 3 lines · Daniel Martin
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.
How would you have the valgrind .pc file but be unable to build with valgrind? .pc files should come with the parts necessary to build.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Eric Anholt
Quoted 3 lines · Daniel Martin
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.
How would you have the valgrind .pc file but be unable to build with valgrind? .pc files should come with the parts necessary to build.
It was a bug in our build system, which didn't exported the include path correctly.
But, regardless of this homebrewn bug. I like to leave decissions up to the user: If it is possible to build without valgrind - make it an option. The same goes for the tests. Where I would like to create a patch too.