forked from vakuum/tcptunnel
-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure
executable file
·58 lines (42 loc) · 923 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
# Help option?
HELP=`echo $* | sed -n -e 's/.*--help.*/HELP/p'`
if [ "$HELP" = "HELP" ]; then
cat << END
Usage: configure [options]
Options:
--prefix=PATH
--help
END
exit 1
fi
# Prefix option?
PREFIX=`echo $* | sed -n -e 's/.*--prefix=\([^\ ]*\).*/\1/p'`
if [ ! "$PREFIX" ]; then
PREFIX="/usr/local/bin/"
fi
PREFIX=`sh -c "echo $PREFIX"` # eval PREFIX=$PREFIX
if [ ! -d "$PREFIX" ]; then
echo "configure: error: $PREFIX isn't a directory."
exit 1
fi
OS=`uname -s 2> /dev/null`
case "$OS" in
FreeBSD)
;;
Linux)
;;
HP-UX)
;;
SunOS)
LDFLAGS='-lxnet'
;;
esac
echo "checking host system type... $OS"
PREFIX=`echo $PREFIX | sed 's#\/#\\\/#g'`
LDFLAGS=`echo $LDFLAGS | sed 's#\/#\\\/#g'`
sed -n -e "s/@PREFIX@/$PREFIX/g;" \
-e "s/@LDFLAGS@/$LDFLAGS/g;" \
-e "w ./src/Makefile" \
./src/Makefile.in
echo "configure: configure complete, now type 'make' and 'make install'."