forked from yatevoip/yate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
yate-config.sh
executable file
·177 lines (166 loc) · 3.64 KB
/
yate-config.sh
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
#! /bin/sh
# yate-config.sh
# This file is part of the YATE Project http://YATE.null.ro
#
# Yet Another Telephony Engine - a fully featured software PBX and IVR
# Copyright (C) 2005-2014 Null Team
#
# This software is distributed under multiple licenses;
# see the COPYING file in the main directory for licensing
# information for this specific distribution.
#
# This use of this software may be subject to additional restrictions.
# See the LEGAL file in the main directory for details.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
if [ ! -f configure ]; then
echo "Cannot find configure" >&2
exit 1
fi
one_param()
{
case "x$pos$1" in
x__ac_subst_vars="'"*"'")
for p in $1; do
one_param "$p"
done
;;
x__ac_subst_vars=*)
pos=""
;;
x__*)
;;
x*"'"*)
pos=__
;;
xPACKAGE_*|xECHO_*|xPATH_SEPARATOR|xCONFIGURE_FILES)
;;
xMUTEX_HACK|xTHREAD_KILL|xFDSIZE_HACK|xMODULE_*)
;;
x*_alias|x*_prefix|xprogram_*)
;;
x[A-Z]*_*)
echo " --param=$1)"
echo " echo \"@$1@\""
echo " ;;"
esac
}
exec > yate-config.in < configure
cat <<"EOF"
#! /bin/sh
# yate-config
# This file is part of the YATE Project http://YATE.null.ro
#
# This is a generated file. You should never need to modify it.
# Take a look at the source file yate-config.sh instead.
#
# Yet Another Telephony Engine - a fully featured software PBX and IVR
# Copyright (C) 2005-2014 Null Team
#
# This software is distributed under multiple licenses;
# see the COPYING file in the main directory for licensing
# information for this specific distribution.
#
# This use of this software may be subject to additional restrictions.
# See the LEGAL file in the main directory for details.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
ustr='Usage: yate-config [--cflags] [--includes] [--c-all]
[--ldflags] [--libs] [--ld-all] [--ld-nostrip] [--ld-strip]
[--config] [--libdir] [--modules] [--share]
[--helpdir] [--scripts] [--skins]
[--version] [--release] [--archlib] [--param=...]'
if [ "$#" = 0 ]; then
echo "$ustr"
exit 0
fi
prefix="@prefix@"
exec_prefix="@exec_prefix@"
datarootdir="@datarootdir@"
shrdir="@datadir@/yate"
libdir="@libdir@"
moddir="@libdir@/yate"
confdir="@sysconfdir@/yate"
s1="@MODULE_CPPFLAGS@"
s2="-I@includedir@/yate"
s3="@MODULE_LDFLAGS@"
s4="@MODULE_SYMBOLS@"
s5="-L$libdir -lyate"
while [ "$#" != 0 ]; do
case "$1" in
--version)
echo "@PACKAGE_VERSION@"
;;
--release)
echo "@PACKAGE_STATUS@@PACKAGE_RELEASE@"
;;
--revision)
echo "@PACKAGE_REVISION@"
;;
--cflags)
echo "$s1"
;;
--includes)
echo "$s2"
;;
--c-all)
echo "$s1 $s2"
;;
--ldflags)
echo "$s3 $s4"
;;
--libs)
echo "$s5"
;;
--ld-all)
echo "$s3 $s4 $s5"
;;
--ld-nostrip)
echo "$s3 $s5"
;;
--ld-strip)
echo "$s4"
;;
--config)
echo "$confdir"
;;
--libdir)
echo "$libdir"
;;
--modules)
echo "$moddir"
;;
--share)
echo "$shrdir"
;;
--helpdir)
echo "$shrdir/help"
;;
--skins)
echo "$shrdir/skins"
;;
--scripts)
echo "$shrdir/scripts"
;;
--archlib)
echo "@ARCHLIB@"
;;
EOF
pos=__
while read REPLY; do
one_param "$REPLY"
done
cat <<"EOF"
*)
echo "I didn't understand: $1" >&2
echo "$ustr" >&2
exit 1
;;
esac
shift
done
EOF