-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure
executable file
·82 lines (71 loc) · 1.22 KB
/
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/usr/bin/env bash
usage()
{
echo ""
echo "Usage: ./configure [--prefix=PREFIX] [--bindir=PATH] [--datadir=PATH]"
echo " [--libdir=PATH] [--mandir=PATH]"
echo ""
}
prefix="/usr/local"
bindir=""
datadir=""
libdir=""
mandir=""
while [[ $# > 0 ]] ; do
CMD="$1"; shift
case "$CMD" in
--prefix=*)
prefix="${CMD#*=}"
;;
--prefix)
prefix="$1"; shift
;;
--bindir=*)
bindir="${CMD#*=}"
;;
--bindir)
bindir="$1"; shift
;;
--datadir=*)
datadir="${CMD#*=}"
;;
--datadir)
datadir="$1"; shift
;;
--libdir=*)
libdir="${CMD#*=}"
;;
--libdir)
libdir="$1"; shift
;;
--mandir=*)
mandir="${CMD#*=}"
;;
--mandir)
mandir="$1"; shift
;;
--help)
usage
exit
;;
*)
echo "WARNING: Unknown argument $CMD." >&2
;;
esac
done
[ -z "$bindir" ] && bindir="$prefix/bin"
[ -z "$datadir" ] && datadir="$prefix/share"
[ -z "$libdir" ] && libdir="$prefix/lib"
[ -z "$mandir" ] && mandir="$prefix/share/man"
(
echo "#"
echo "# This file is automatically created by ./configure, DO NOT EDIT!"
echo "#"
echo ""
echo "prefix=$prefix"
echo "bindir=$bindir"
echo "datadir=$datadir"
echo "libdir=$libdir"
echo "mandir=$mandir"
) > config.make
exit 0