-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfigure
executable file
·58 lines (53 loc) · 1.6 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
#!/bin/bash
# Copyright (c) 2011 Akamai Technologies, Inc.
RE="--([^=]+)=(.+)"
while test $# != 0
do
case $1 in
--prefix*|--bindir*|--sbindir*|--localstatedir*|--sysconfdir*|--libdir*|--libexecdir*|--sharedir*|--mandir*|--platform*)
if [[ $1 =~ $RE ]]; then
K=${BASH_REMATCH[1]}
UK=$(echo "${BASH_REMATCH[1]}" | tr [:lower:] [:upper:])
V=${BASH_REMATCH[2]}
eval $K=$V
eval $UK=$V
else
echo "Unable to parse argument:"
echo
echo " $1"
echo
echo "use style --k=v instead."
exit 1
fi
;;
esac
shift
done
DESTDIR=${DESTDIR:-/}
PREFIX=${PREFIX:-/usr}
BINDIR=${BINDIR:-\${DESTDIR\}${PREFIX}/bin}
SBINDIR=${SBINDIR:-\${DESTDIR\}${PREFIX}/sbin}
LOCALSTATEDIR=${LOCALSTATEDIR:-\${DESTDIR\}/var}
SYSCONFDIR=${SYSCONFDIR:-\${DESTDIR\}/etc}
LIBDIR=${LIBDIR:-\${DESTDIR\}${PREFIX}/lib}
LIBEXECDIR=${LIBEXECDIR:-\${DESTDIR\}${PREFIX}/libexec}
SHAREDIR=${SHAREDIR:-\${DESTDIR\}${PREFIX}/share}
MANDIR=${MANDIR:-\${sharedir\}/man}
PLATFORM=${PLATFORM:-$(uname -s)}
cat > config.mk <<EOF
# This config.mk was automatically generated by the ./configure script of
# vscan. If the configure script identified anything incorrectly, then you can
# edit this file to try to correct things. However, be warned that ./configure
# will destroy your changes if it is run again, e.g. by "make".
DESTDIR ?= ${DESTDIR}
prefix ?= ${PREFIX}
bindir ?= ${BINDIR}
sbindir ?= ${SBINDIR}
localstatedir ?= ${LOCALSTATEDIR}
sysconfdir ?= ${SYSCONFDIR}
libdir ?= ${LIBDIR}
libexecdir ?= ${LIBEXECDIR}
sharedir ?= ${SHAREDIR}
mandir ?= ${MANDIR}
include config.${PLATFORM}.mk
EOF