diff options
author | Chris Wilson | 2012-02-12 18:19:17 -0600 |
---|---|---|
committer | Chris Wilson | 2012-02-12 18:24:14 -0600 |
commit | ced219ebbd3b266ac8326223bad62f994907ae6b (patch) | |
tree | e0e983205c69428a69e84d2a0c1bf5df2106785b /configure.ac | |
parent | 90b23cc24c19fbe131d84237c55311cafeb4ca21 (diff) | |
download | external-libgbm-ced219ebbd3b266ac8326223bad62f994907ae6b.tar.gz external-libgbm-ced219ebbd3b266ac8326223bad62f994907ae6b.tar.xz external-libgbm-ced219ebbd3b266ac8326223bad62f994907ae6b.zip |
configure: Fix pkg-config test in absence of valgrind
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>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index d72874bc..97bbcb72 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -261,8 +261,10 @@ if test "x$INTEL" != "xno" -o "x$RADEON" != "xno"; then | |||
261 | fi | 261 | fi |
262 | fi | 262 | fi |
263 | 263 | ||
264 | PKG_CHECK_MODULES(VALGRIND, [valgrind], | 264 | PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no]) |
265 | AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress false warings]),) | 265 | if test "x$have_valgrind" = "xyes"; then |
266 | AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress false warnings]) | ||
267 | fi | ||
266 | 268 | ||
267 | AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" != "xno"]) | 269 | AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" != "xno"]) |
268 | AM_CONDITIONAL(HAVE_RADEON, [test "x$RADEON" != "xno"]) | 270 | AM_CONDITIONAL(HAVE_RADEON, [test "x$RADEON" != "xno"]) |