aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2009-12-01 15:52:44 -0800
committerCarl Worth <cworth@cworth.org>2009-12-01 16:33:25 -0800
commit1682633f65061247d90129b73650593261eed892 (patch)
tree30dd25581d13a31501ea145e37a4534248979c7d /configure
parent880b21a097104bee5f50a444c5130695d143fd8a (diff)
configure: Fix valgrind check to take effect, and to work.
We were missing an "override" directive in the assignment of CFLAGS within Makefile.config so it was actually having no effect. Then, we were also failing to get the proper include path for valgrind.h so it wouldn't have worked even it were having effect. Fix both problems.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure8
1 files changed, 5 insertions, 3 deletions
diff --git a/configure b/configure
index 2ceda74..6b57197 100755
--- a/configure
+++ b/configure
@@ -61,10 +61,12 @@ fi
printf "Checking for valgrind development files... "
if pkg-config --modversion valgrind > /dev/null 2>&1; then
printf "Yes.\n"
- have_valgrind=-DHAVE_VALGRIND
+ have_valgrind=1
+ valgrind_flags=$(pkg-config --cflags valgrind)
else
printf "No (but that's fine).\n"
- have_valgrind=
+ have_valgrind=0
+ valgrind_flags=
fi
if [ $errors -gt 0 ]; then
@@ -137,5 +139,5 @@ EOF
# construct the Makefile.config
cat > Makefile.config <<EOF
prefix = /usr/local
-CFLAGS += ${have_valgrind}
+override CFLAGS += -DHAVE_VALGRIND=${have_valgrind} ${valgrind_flags}
EOF