[pygobject] autogen.sh: Only enable code coverage if lcov is installed



commit 0456d9c892b76ed79134230a4a8610a23c602964
Author: Martin Pitt <martinpitt gnome org>
Date:   Fri Nov 9 06:44:46 2012 +0100

    autogen.sh: Only enable code coverage if lcov is installed
    
    Otherwise we break minimal build environments.

 autogen.sh |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index e10f311..467252d 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -13,7 +13,13 @@ if test -z $AUTORECONF; then
         exit 1
 fi
 
+if type lcov >/dev/null 2>&1; then
+    EXTRA_ARGS="--enable-code-coverage"
+else
+    echo "lcov not installed, not enabling code coverage"
+fi
+
 autoreconf --force --install --verbose || exit $?
 
 cd "$olddir"
-test -n "$NOCONFIGURE" || "$srcdir/configure" --enable-code-coverage "$@"
+test -n "$NOCONFIGURE" || "$srcdir/configure" $EXTRA_ARGS "$@"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]