blob: 01993ec4ae7e434fff2c1e37d965f5a78482ee87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#!/usr/bin/env bash
prefix=/usr/local
common_packages=" mono-addins;0.3 monodevelop;3.0.3.2 monodevelop-core-addins;2.7"
usage ()
{
echo "Usage : configure [OPTION]... [--config=CONFIG]"
echo
echo "Options:"
echo " --prefix=PREFIX install architecture-independent files in PREFIX"
echo " [/usr/local]"
echo
}
check_package ()
{
name=`echo $1 | cut -d\; -f1`
version=`echo $1 | cut -d\; -f2`
echo -n "Checking for package '$name'.." | tee -a config.log
pkg-config --atleast-version=$version $name
if [ $? -ne 0 ]; then
echo " ERROR: Package named '$name' >= $version not found." | tee -a config.log
echo "Try adjusting your PKG_CONFIG_PATH environment variable." | tee -a config.log
return 1
fi
echo " found." | tee -a config.log
}
check_required_packages ()
{
echo "Looking for required packages" | tee config.log
var=required_packages_$config
for pkg in $common_packages ${!var}; do
check_package $pkg
retval=$?
[ $retval -ne 0 ] && return $retval
done
return 0
}
while test x$1 != x; do
case $1 in
--prefix=*)
prefix=`echo $1 | sed 's/--prefix=//'`
;;
--prefix)
shift
prefix=$1
;;
--help)
usage
exit
;;
*)
echo Unknown argument $1 >&2
usage
exit 1
;;
esac
shift
done
check_required_packages
[ $? -eq 1 ] && exit 1
echo "prefix=$prefix" > config.make
echo
echo "$PACKAGE has been configured with "
echo " prefix = $prefix"
echo
|