forked from imvu-open/istatd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure
More file actions
executable file
·147 lines (135 loc) · 4.21 KB
/
configure
File metadata and controls
executable file
·147 lines (135 loc) · 4.21 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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#!/bin/bash
# Simple configuration script for people who expect such a script to exist.
# Please do not convert istatd to autotools. We will likely not accept such
# a conversion. Thanks for your interest in istatd, and good luck!
set -e
set -o nounset
rm -f makevars.config
# Find Python version 2.
# If this fails, you need to create appropriate aliases or symlinks for
# testing to work!
/usr/bin/env python -V
echo "# makevars.config for istatd generated on " `date` > makevars.config
BOOST_SYSTEM=""
BOOST_FILESYSTEM=""
STATGRAB=""
LIBRT=""
DESTDIR=""
USR_PREFIX=""
VAR_PREFIX=""
ETC_PREFIX=""
while [ $# -gt 0 ]; do
case $1 in
--boost_system)
shift
BOOST_SYSTEM="$1"
;;
--boost_filesystem)
shift
BOOST_FILESYSTEM="$1"
;;
--statgrab)
shift
STATGRAB="$1"
;;
--librt)
shift
LIBRT="$1"
;;
--prefix)
shift
DESTDIR="$1"
;;
--usr-prefix)
shift
USR_PREFIX="$1"
;;
--var-prefix)
shift
VAR_PREFIX="$1"
;;
--etc-prefix)
shift
ETC_PREFIX="$1"
;;
*)
echo "Options:"
echo "--boost_system -lboost_system-mt What is the boost_system library name?"
echo "--boost_filesystem -lboost_filesystem-mt What is the boost_filesystem library name?"
echo "--statgrab -lstatgrab What is the statgrab library name?"
echo "--librt -lrt What is the librt library name (if any)?"
echo "--prefix / What is the root of the install?"
echo "--usr-prefix /usr What is the '/usr' directory for executables?"
echo "--var-prefix /var What is the '/var' directory for database data?"
echo "--etc-prefix /etc What is the '/etc/ directory for rc.d scripts?"
echo "No equal sign for option values."
exit 1
;;
esac
shift
done
# see if we need to install boost
if [ ! -d /usr/include/boost -a ! -d /usr/local/include/boost ]; then
echo "You need to install libboost-all-dev for your distribution."
exit 1
fi
if [ ! -r /usr/include/statgrab.h -a ! -r /usr/local/include/statgrab.h ]; then
echo "You need to install libstatgrab-dev for your distribution, or "
echo "download and install it from source. See README.md"
exit 1
fi
# boost_system is a pain across versions
if [ -z "$BOOST_SYSTEM" ]; then
if [ -r /usr/lib/libboost_system.so ]; then
BOOST_SYSTEM=-lboost_system
elif [ -r /usr/lib/libboost_system-mt.so ]; then
BOOST_SYSTEM=-lboost_system-mt.so
fi
fi
# boost_filesystem is also somewhat a pain
if [ -z "$BOOST_FILESYSTEM" ]; then
if [ -r /usr/lib/libboost_filesystem.so ]; then
BOOST_FILESYSTEM=-lboost_filesystem
elif [ -r /usr/lib/libboost_filesystem-mt.so ]; then
BOOST_FILESYSTEM=-lboost_filesystem-mt
fi
fi
if [ -z "$STATGRAB" ]; then
if [ -r /usr/lib/libstatgrab.so ]; then
STATGRAB=-lstatgrab
elif [ -r /usr/local/lib/libstatgrab.so ]; then
STATGRAB=-lstatgrab
fi
fi
if [ -z "$LIBRT" ]; then
if [ -r /usr/lib/librt.so ]; then
LIBRT=-lrt
elif [ -r /usr/local/lib/librt.so ]; then
LIBRT=-lrt
fi
fi
if [ ! -z "$BOOST_SYSTEM" ]; then
echo "BOOST_SYSTEM=$BOOST_SYSTEM" >> makevars.config
fi
if [ ! -z "$BOOST_FILESYSTEM" ]; then
echo "BOOST_FILESYSTEM=$BOOST_FILESYSTEM" >> makevars.config
fi
if [ ! -z "$STATGRAB" ]; then
echo "STATGRAB=$STATGRAB" >> makevars.config
fi
if [ ! -z "$LIBRT" ]; then
echo "LIBRT=$LIBRT" >> makevars.config
fi
if [ ! -z "$DESTDIR" ]; then
echo "DESTDIR=$DESTDIR" >> makevars.config
fi
if [ ! -z "$USR_PREFIX" ]; then
echo "USR_PREFIX=$USR_PREFIX" >> makevars.config
fi
if [ ! -z "$VAR_PREFIX" ]; then
echo "VAR_PREFIX=$VAR_PREFIX" >> makevars.config
fi
if [ ! -z "$ETC_PREFIX" ]; then
echo "ETC_PREFIX=$ETC_PREFIX" >> makevars.config
fi
echo "All done"