forked from libgeos/geos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·57 lines (48 loc) · 899 Bytes
/
configure
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
#!/bin/sh
which cmake > /dev/null 2>&1 || {
echo "You need cmake to build this package" >&2
exit 1
}
srcdir=$(dirname $0)
usage() {
echo "$0 [--prefix=<prefix>] [--enable-debug] [--help]"
}
cmd=cmake
options=$(getopt -l "help,enable-debug,prefix:" "" "$@")
#echo XXXX ${options}
eval set -- "$options"
while true; do
case $1 in
--prefix)
shift
cmd="${cmd} -DCMAKE_INSTALL_PREFIX:PATH=$1"
;;
--enable-debug)
cmd="${cmd} -DCMAKE_BUILD_TYPE=RelWithDebInfo"
;;
--help)
usage
exit
;;
--)
shift
break
;;
*)
echo "Unrecognized switch $1" >&2
usage >&2
exit 1
;;
esac
shift
done
cmd="${cmd} ${srcdir}"
echo
echo "WARNING: this script is a wrapper for cmake"
echo
echo "INFO: Invoking ${cmd}"
echo
$cmd
echo
echo "HINT: for interactive configuration use ccmake ${srcdir}"
echo