forked from fsprojects/zarchive-fsharpbinding
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.sh
executable file
·37 lines (26 loc) · 1019 Bytes
/
configure.sh
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
#! /bin/bash -e
# ------------------------------------------------------------------------------
# Parse command line arguments and specify default values
MONO=mono
while getopts e:f:c:n OPT; do
case "$OPT" in
e) MONO=$OPTARG
;;
n) MONO=""
;;
esac
done
# ------------------------------------------------------------------------------
# Utility function that searches specified directories for a specified file
# and if the file is not found, it asks user to provide a directory
RESULT=""
# On OSX use Mono's private copy of pkg-config if it exists, see https://github.com/fsharp/fsharp/issues/107
osx_pkg_config=/Library/Frameworks/Mono.framework/Versions/Current/bin/pkg-config
if test -e $osx_pkg_config; then
PKG_CONFIG=$osx_pkg_config
elif test "x$PKG_CONFIG" = "xno"; then
PKG_CONFIG=`which pkg-config`
fi
MONODIR=`$PKG_CONFIG --variable=libdir mono`/mono/4.0
echo "Assuming Mono root directory." $MONODIR
sed -e "s,INSERT_MONO_BIN,$MONODIR,g" Makefile.orig > Makefile