mono-test-install 990 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. while test x$1 != x; do
  8. if test -x $1/mono; then
  9. if test x$monocmd = x; then
  10. monocmd=$1/mono
  11. else
  12. other_monos="$1/mono $other_monos"
  13. fi
  14. fi
  15. shift
  16. done
  17. echo Active Mono: $monocmd
  18. if test "x$other_monos" != x; then
  19. echo "Other Mono executables: $other_monos"
  20. fi
  21. #
  22. # Check that the pkg-config mono points to this mono
  23. #
  24. if pkg-config --modversion mono >& /dev/null; then
  25. pkg_config_mono=`(cd \`pkg-config --variable prefix mono\`/bin; pwd)`/mono
  26. if test $pkg_config_mono != $monocmd; then
  27. echo "Error: pkg-config Mono installation points to a different install"
  28. echo " than the Mono found:"
  29. echo " Mono on PATH: $monocmd"
  30. echo " Mono from pkg-config: $pkg_config_mono"
  31. exit 1
  32. fi
  33. else
  34. echo "Warning: pkg-config could not find mono installed on this system"
  35. fi