diff --git a/acinclude.m4 b/acinclude.m4
index 4cfc80a..960d54c 100644
--- a/acinclude.m4
+++ b/acinclude.m4
misc_ldflags="$misc_ldflags -pie"
fi
])
- if (test "$USE_MAINTAINER_MODE" = "yes"); then
+ if (test "$enable_coverage" = "yes"); then
misc_cflags="$misc_cflags --coverage"
misc_ldflags="$misc_ldflags --coverage"
fi
diff --git a/configure.ac b/configure.ac
index 196e784..a70d55a 100644
--- a/configure.ac
+++ b/configure.ac
[Directory for the Android daemon storage files])
if (test "$USE_MAINTAINER_MODE" = "yes"); then
- AC_CHECK_PROG([LCOV], [lcov], [yes], AC_MSG_ERROR(lcov is required))
+ AC_CHECK_PROG(enable_coverage, [lcov], [yes], [no])
fi
-AM_CONDITIONAL(COVERAGE, test "$LCOV" = "yes")
+AM_CONDITIONAL(COVERAGE, test "${enable_coverage}" = "yes")
AC_OUTPUT(Makefile src/bluetoothd.8 lib/bluez.pc)