2006-11-24 20:07:18 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
2006-11-27 15:48:17 +03:00
|
|
|
VERSION=0.2
|
2006-11-24 20:07:18 +03:00
|
|
|
|
|
|
|
help()
|
|
|
|
{
|
|
|
|
echo ""
|
2006-11-30 14:17:13 +03:00
|
|
|
echo "Usage is: configure [--prefix=PREFIX] [--cecil=PATH_TO_CECIL_DLL]"
|
2006-11-24 20:07:18 +03:00
|
|
|
echo ""
|
|
|
|
}
|
|
|
|
|
|
|
|
prefix=/usr/local
|
2006-11-30 14:17:13 +03:00
|
|
|
cecilbin=
|
2006-11-24 20:07:18 +03:00
|
|
|
|
|
|
|
while [ $# -ne 0 ]; do
|
|
|
|
case $1 in
|
|
|
|
--help)
|
|
|
|
help
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
--prefix=*)
|
|
|
|
prefix=`echo $1 | sed 's/--prefix=//'`;
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
--prefix)
|
|
|
|
shift
|
|
|
|
prefix="$1"
|
|
|
|
shift
|
|
|
|
;;
|
2006-11-30 14:17:13 +03:00
|
|
|
--cecil=*)
|
|
|
|
cecilbin=`echo $1 | sed 's/--cecil=//'`;
|
|
|
|
shift
|
|
|
|
;;
|
2006-11-24 20:07:18 +03:00
|
|
|
*)
|
|
|
|
echo Unknown option: $1
|
|
|
|
help
|
|
|
|
shift
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2006-11-30 14:17:13 +03:00
|
|
|
if test -z "$cecilbin"; then
|
|
|
|
cecilbin=`pkg-config --variable=Libraries mono-cecil`
|
|
|
|
fi
|
2006-11-24 20:07:18 +03:00
|
|
|
|
2006-11-30 14:17:13 +03:00
|
|
|
if test -z "$cecilbin"; then
|
2006-11-24 20:07:18 +03:00
|
|
|
echo "Cecil is not installed."
|
2006-11-30 14:17:13 +03:00
|
|
|
if test -f Mono.Cecil.dll; then
|
|
|
|
echo "Using packaged Mono.Cecil.dll."
|
|
|
|
else
|
|
|
|
echo "No Mono.Cecil.dll found, use --cecil=/path/to/Mono.Cecil.dll option."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# copy Mono.Cecil here
|
|
|
|
echo "Using Cecil from $cecilbin."
|
|
|
|
cp $cecilbin .
|
2006-11-24 20:07:18 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "prefix=$prefix" > config.make
|
2006-11-24 22:09:27 +03:00
|
|
|
echo "VERSION=$VERSION" >> config.make
|
2006-11-27 15:48:17 +03:00
|
|
|
echo "class Constants {public const string Version=\"$VERSION\";}" >Constants.cs
|
2006-11-24 20:07:18 +03:00
|
|
|
|
|
|
|
echo "#!/bin/sh" > monocov
|
|
|
|
echo "exec mono $prefix/lib/monocov/monocov.exe \$@" >> monocov
|
|
|
|
chmod +x monocov
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "MonoCov module configured"
|
|
|
|
echo ""
|
|
|
|
echo " Prefix: $prefix"
|
2006-11-27 15:48:17 +03:00
|
|
|
echo " Version: $VERSION"
|
2006-11-24 20:07:18 +03:00
|
|
|
echo ""
|
|
|
|
|
|
|
|
exit 0;
|