-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·106 lines (96 loc) · 2.46 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#!/bin/sh
# This script provides basic compatibility with automake configure scripts
# for use in automated build systems. See:
#
# https://people.gnome.org/~walters/docs/build-api.txt
#
print_help() {
echo "--prefix=DIR Install files in DIR (default /usr)"
echo "--libdir=DIR Install library files in DIR/tgt (default PREFIX/lib)"
echo "--sysconfdir=DIR Install configuration files in DIR (default /etc)"
echo "--datadir=DIR Install data files in DIR (default $PREFIX/share)"
echo "--mandir=DIR Install configuration files in DIR (default DATADIR/man)"
echo "--docdir=DIR Install documentation files in DIR (default DATADIR/doc/tgt)"
echo "--sbindir=DIR Install binaries in DIR (default DATADIR/sbin)"
echo "--disable-man Disable building and installing man pages"
}
top_srcdir=$(dirname $0)
prefix=/usr
exec_prefix='$(prefix)'
bindir='$(prefix)/bin'
sbindir='$(exec_prefix)/sbin'
datadir='$(prefix)/share'
mandir='$(datadir)/man'
sysconfdir='$(prefix)/etc'
CFLAGS='-O2 -g'
CXXFLAGS='-O2 -g'
while [ $# '>' 0 ] ; do
option=`expr "$1" : '\([^=]*\)='`
optarg=
consume_next=false
if [ x$option != x ]; then
optarg=`expr "$1" : '[^=]*=\(.*\)'`
shift
else
option=$1
shift
if expr "$option" : '-' > /dev/null ; then
consume_next=true
optarg=$1
fi
fi
case $option in
--prefix)
prefix=$optarg
;;
--exec_prefix)
exec_prefix=$optarg
;;
--sysconfdir)
sysconfdir=$optarg
;;
--mandir)
mandir=$optarg
;;
--datadir)
docdir=$optarg
;;
--sbindir)
mandir=$optarg
;;
CFLAGS)
CFLAGS=$optarg
;;
CXXFLAGS)
CXXFLAGS=$optarg
;;
--with-*|--without-*|--enable-*|--disable-*)
consume_next=false
;;
--help)
print_help
exit
;;
esac
if $consume_next ; then
shift
fi
done
cat > config.mk <<EOF
prefix = $prefix
exec_prefix = $exec_prefix
sbindir = $sbindir
bindir = $bindir
datadir = $datadir
mandir = $mandir
sysconfdir = $sysconfdir
OPT_CFLAGS = $CFLAGS
OPT_CXXFLAGS = $CXXFLAGS
EOF
if [ "$(pwd)" != "$(cd $top_srcdir && pwd)" ] ; then
cat > Makefile <<EOF
top_srcdir = $top_srcdir
include \$(top_srcdir)/Makefile
EOF
fi
make makefiles