summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@slbdata.se>2010-02-01 15:15:38 +0100
committerSamuel Lidén Borell <samuel@slbdata.se>2010-02-01 15:15:38 +0100
commitb62e9c7c0013f9635e9ce3d6d199fa5f83f3fe21 (patch)
tree063e8b9b0057b8a63220124ecaf149bc13556a82
parent19a65afe41495e56a7565f654662c4bdc6755ecb (diff)
downloadfribid-b62e9c7c0013f9635e9ce3d6d199fa5f83f3fe21.tar.gz
fribid-b62e9c7c0013f9635e9ce3d6d199fa5f83f3fe21.tar.bz2
fribid-b62e9c7c0013f9635e9ce3d6d199fa5f83f3fe21.zip
Dependency checking in the "configure" script
-rwxr-xr-xconfigure30
1 files changed, 30 insertions, 0 deletions
diff --git a/configure b/configure
index 98532f7..514b3b5 100755
--- a/configure
+++ b/configure
@@ -156,6 +156,36 @@ if [ -z "$hasPaths" ]; then
fi
+### Check dependencies
+utilities="make pkg-config msgfmt"
+depError=""
+if ! type $utilities > /dev/null 2> /dev/null; then
+ echo "Error: Missing commands:" >&2
+ for utility in $utilities; do
+ if ! type "$utility" > /dev/null 2> /dev/null; then
+ echo " $utility" >&2
+ depError=1
+ fi
+ done
+fi
+
+oldifs=IFS
+IFS=";"
+pkgconfigDeps="gtk+-2.0 >= 2.12;glib-2.0;nss >= 3.10;nspr"
+
+if ! pkg-config --exists $pkgconfigDeps; then
+ echo "Error: Unsatisfied dependencies: " >&2
+ for dep in $pkgconfigDeps; do
+ pkg-config --exists $dep || echo " $dep" >&2
+ done
+ depError=1
+fi
+IFS=oldifs
+
+if [ -n "$depError" ]; then
+ exit 1
+fi
+
### Write configuration
CONFFILE="$basedir/common/config.h"