summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 90b23cc)
raw | patch | inline | side by side (parent: 90b23cc)
author | Chris Wilson <chris@chris-wilson.co.uk> | |
Mon, 13 Feb 2012 00:19:17 +0000 (00:19 +0000) | ||
committer | Chris Wilson <chris@chris-wilson.co.uk> | |
Mon, 13 Feb 2012 00:24:14 +0000 (00:24 +0000) |
The empty string used for the not case is replaced by the default
if-else clause and so causes the configure to fail in the absence of
valgrind. Which is not quite what was intended.
Instead use the common idiom of setting a variable depending on whether
the true or false branch is taken and emit the conditional code as a
second step.
Reported-by: Tobias Jakobi <liquid.acid@gmx.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
if-else clause and so causes the configure to fail in the absence of
valgrind. Which is not quite what was intended.
Instead use the common idiom of setting a variable depending on whether
the true or false branch is taken and emit the conditional code as a
second step.
Reported-by: Tobias Jakobi <liquid.acid@gmx.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
configure.ac | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index d72874bc614b23f471d62df5872b62479c3d8057..97bbcb72dbd57a67c4ff63ed16fd4373d82d51a3 100644 (file)
--- a/configure.ac
+++ b/configure.ac
fi
fi
-PKG_CHECK_MODULES(VALGRIND, [valgrind],
- AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress false warings]),)
+PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no])
+if test "x$have_valgrind" = "xyes"; then
+ AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress false warnings])
+fi
AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" != "xno"])
AM_CONDITIONAL(HAVE_RADEON, [test "x$RADEON" != "xno"])