-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfigure
More file actions
65 lines (59 loc) · 1.9 KB
/
configure
File metadata and controls
65 lines (59 loc) · 1.9 KB
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
#!/bin/sh
#
# This file is part of Bolt.
# Copyright (C) 2009-2012 Xavier Clerc.
#
# Bolt is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Bolt is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
set -e
# default values
ocamlbuild=`which ocamlbuild || echo '/usr/local/bin/ocamlbuild'`
bin_path=`dirname $ocamlbuild`
ocaml_prefix=`dirname $bin_path`
ocamlfind=`which ocamlfind 2> /dev/null || echo ''`
native_dynlink='TRUE'
devel='FALSE'
# command-line analysis
while [ $# -gt 0 ]
do
case "$1" in
-ocaml-prefix)
ocaml_prefix="$2"; shift;;
-ocamlfind)
ocamlfind="$2"; shift;;
-no-native-dynlink)
native_dynlink='FALSE';;
-devel)
devel='TRUE';;
*)
echo "usage: $0 [-ocaml-prefix <path>] [-ocamlfind <path>] [-no-native-dynlink] [-devel]";
exit 1;;
esac
shift
done
# make options
make_quiet=`make -f - <<EOF
default: gnumake
@if [ "$^" != "" ]; then echo '--no-print-directory'; fi
gnumake:
EOF`
# file creation
echo "# timestamp: `date`" > Makefile.config
echo "PATH_OCAML_PREFIX=$ocaml_prefix" >> Makefile.config
echo "PATH_OCAMLFIND=$ocamlfind" >> Makefile.config
echo "NATIVE_DYNLINK=$native_dynlink" >> Makefile.config
echo "WARNINGS=$devel" >> Makefile.config
echo "MAKE_QUIET=$make_quiet" >> Makefile.config
echo "" >> Makefile.config
echo 'Makefile.config successfully created'