-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathconfigure
More file actions
executable file
·103 lines (85 loc) · 2.3 KB
/
configure
File metadata and controls
executable file
·103 lines (85 loc) · 2.3 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
#!/bin/sh
print_usage()
{
echo "
This is a simple configure script for the streamer.
It accept the following options:
-h this help
--with-ldlibs dir: extra LDLIBS to pass to make
--with-ldflags dir: extra LDFLAGS to pass to make
--with-grapes dir: path to the GRAPES libarary
--with-ffmpeg dir: path to FFMPEG libs, needed when GRAPES was compilef with it
--with-napa dir: path to the NAPA BASELIBS
--with-libevent dir: path to the LIBEVENT libarary, required by the ML
--with-net-helper: which net-helper to use (ml for the Messaging Library, udp for GRAPES UDP)
--with-monl: use MONL, the MONitoring Library (requires ML)
--with-io mode: choose IO/type (grapes/chunkstream)
--with-static dir: set default build to 0:dynamic 1:halfstatic 2:static
"
}
#process options
while [ -n "$1" ] ; do
case "$1" in
--with-ldlibs) shift
LDLIBS=$1 ;;
--with-ldlibs=*)
LDLIBS="${1#*=}" ;;
--with-ldflags) shift
LDFLAGS=$1 ;;
--with-ldflags=*)
LDFLAGS="${1#*=}" ;;
--with-grapes) shift
GRAPES=$1 ;;
--with-grapes=*)
GRAPES="${1#*=}" ;;
--with-ffmpeg) shift
FFMPEG_DIR=$1 ;;
--with-ffmpeg=*)
FFMPEG_DIR="${1#*=}" ;;
--with-napa) shift
NAPA=$1 ;;
--with-napa=*)
NAPA="${1#*=}" ;;
--with-libevent) shift
LIBEVENT_DIR=$1 ;;
--with-libevent=*)
LIBEVENT_DIR="${1#*=}" ;;
--with-net-helper) shift
NET_HELPER=$1 ;;
--with-net-helper=*)
NET_HELPER="${1#*=}" ;;
--with-monl)
MONL=1 ;;
--with-io) shift
IO=$1 ;;
--with-io=*)
IO="${1#*=}" ;;
--with-static) shift
STATIC=$1 ;;
--with-static=*)
STATIC="${1#*=}" ;;
-h) print_usage
exit 0 ;;
*)
echo "Invalid option: $1" >&2
print_usage
exit 1
;;
esac
shift
done
[ -d "$GRAPES" ] || { echo "you need GRAPES to build the Streamer"; exit 1; }
cat >config.mak.tmp <<END
LDLIBS+=$LDLIBS
LDFLAGS+=$LDFLAGS
FFMPEG_DIR?=$FFMPEG_DIR
GRAPES?=$GRAPES
NAPA?=$NAPA
LIBEVENT_DIR?=$LIBEVENT_DIR
NET_HELPER?=$NET_HELPER
MONL?=$MONL
END
[ -n "$IO" ] && echo "IO?=$IO" >>config.mak.tmp
[ -n "$STATIC" ] && echo "STATIC?=$STATIC" >>config.mak.tmp
diff config.mak.tmp config.mak >/dev/null 2>/dev/null || cp config.mak.tmp config.mak
rm -f config.mak.tmp