summaryrefslogtreecommitdiff
blob: 9614f19ef27b380c962e861c63ed00006e5541fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 81d0728db9d7442407c0d308ff1501d5778a14ed Mon Sep 17 00:00:00 2001
From: Arun Raghavan <ford_prefect@gentoo.org>
Date: Wed, 8 Sep 2010 22:59:53 +0530
Subject: [PATCH] configure: Make valgrind header check optional

---
 configure.ac |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 417b56b..ecfd2d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,7 +84,16 @@ if test "$orc_cv_monotonic_clock" = "yes"; then
   AC_DEFINE(HAVE_MONOTONIC_CLOCK,1,[Defined if we have a monotonic clock])
 fi
 
-AC_CHECK_HEADERS([valgrind/valgrind.h])
+AC_ARG_ENABLE([valgrind],
+  AC_HELP_STRING([--enable-valgrind],[enable valgrind support (default: auto)]),
+  [], [enable_valgrind=auto])
+if test "x${enable_valgrind}" != "xno"; then
+  AC_CHECK_HEADERS([valgrind/valgrind.h],
+		   [found_valgrind_h=yes], [found_valgrind_h=no])
+  if test "x${enable_valgrind}" = "xyes" -a "x${found_valgrind_h}" = "no"; then
+    AC_MSG_ERROR([Valgrind support requested, but valgrind/valgrind.h not found. Have you installed the valgrind development package?])
+  fi
+fi
 
 AS_COMPILER_FLAG(-Wall, ORC_CFLAGS="$ORC_CFLAGS -Wall")
 if test "x$ORC_CVS" = "xyes"
-- 
1.7.2.2