浏览代码

configure.ac: new option --disable-valgrind, when set, configure does not check the availability of valgrind.h and helgrind.h

Nathalie Furmento 11 年之前
父节点
当前提交
0df299d260
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7 2
      configure.ac

+ 7 - 2
configure.ac

@@ -255,8 +255,13 @@ AM_CONDITIONAL([STARPU_LONG_CHECK], [test "x$enable_long_check" = "xyes"])
 
 AC_CHECK_HEADERS([malloc.h], [AC_DEFINE([STARPU_HAVE_MALLOC_H], [1], [Define to 1 if you have the <malloc.h> header file.])])
 
-AC_CHECK_HEADERS([valgrind/valgrind.h], [AC_DEFINE([STARPU_HAVE_VALGRIND_H], [1], [Define to 1 if you have the <valgrind/valgrind.h> header file.])])
-AC_CHECK_HEADERS([valgrind/helgrind.h], [AC_DEFINE([STARPU_HAVE_HELGRIND_H], [1], [Define to 1 if you have the <valgrind/helgrind.h> header file.])])
+AC_ARG_ENABLE(valgrind, [AS_HELP_STRING([--disable-valgrind],
+				   [Do not check the availability of valgrind.h and helgrind.h])],
+				   enable_valgrind=$enableval, enable_valgrind=yes)
+if test x$enable_valgrind = xyes ; then
+   AC_CHECK_HEADERS([valgrind/valgrind.h], [AC_DEFINE([STARPU_HAVE_VALGRIND_H], [1], [Define to 1 if you have the <valgrind/valgrind.h> header file.])])
+   AC_CHECK_HEADERS([valgrind/helgrind.h], [AC_DEFINE([STARPU_HAVE_HELGRIND_H], [1], [Define to 1 if you have the <valgrind/helgrind.h> header file.])])
+fi
 
 AC_CHECK_FUNC([sched_yield], [AC_DEFINE([STARPU_HAVE_SCHED_YIELD], [1], [Define to 1 if the function sched_yield is available.])])