New tests.
[mono.git] / scripts / mono-test-install
1 #!/bin/sh
2 #
3 # Does various checks for people that we can use to diagnose
4 # an end user installation
5 #
6 set `echo $PATH | sed 's/:/ /g'`
7
8 while test x$1 != x; do
9     if test -x $1/mono; then
10         if test x$monocmd = x; then
11            monocmd=$1/mono
12         else
13            other_monos="$1/mono $other_monos"
14         fi
15     fi
16     shift
17 done
18
19 echo Active Mono: $monocmd
20
21 if test "x$other_monos" != x; then
22         echo "Other Mono executables: $other_monos"
23 fi
24
25
26 #
27 # Check that the pkg-config mono points to this mono
28 #
29 if pkg-config --modversion mono >& /dev/null; then 
30         pkg_config_mono=`(cd \`pkg-config --variable prefix mono\`/bin; pwd)`/mono
31         if test $pkg_config_mono != $monocmd; then
32             echo "Error: pkg-config Mono installation points to a different install"
33             echo "       than the Mono found:"
34             echo "       Mono on PATH: $monocmd"
35             echo "       Mono from pkg-config: $pkg_config_mono"
36             exit 1
37         fi
38 else 
39         echo "Warning: pkg-config could not find mono installed on this system"
40 fi
41