-
Notifications
You must be signed in to change notification settings - Fork 8
/
xmlrpc-c-config
executable file
·105 lines (94 loc) · 2.61 KB
/
xmlrpc-c-config
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
#! /bin/sh
comp=
need_cxx=
need_client=
need_server=
need_abyss=
need_pstream=
need_packetsocket=
need_cgi=
show_help() {
cat <<EOF
Usage: xmlrpc-c-config <feature> ... <option> ...
The features are:
c++ legacy C++ wrapper API
c++2 modern C++ API
client client functions
cgi-server CGI-based server functions
abyss-server ABYSS-based server functions
pstream-server pstream-based server functions
server-util basic server functions (implied by *-server)
Options are:
--version The version number of the package
--features List all features (aka modules) currently installed
--cflags C compiler flags to use when '#include'ing package headers
--libs Libraries and flags to use when linking programs normally
--ldadd Libraries to use with automake
--ldflags Flags to use with automake & libtool
--prefix The prefix under which the package was installed
EOF
exit $1
}
test $# -ne 0 || show_help 1 >&2
while test $# -gt 0; do
case $1 in
(c++) comp="$comp xmlrpc_cpp";;
(server-util) need_server=1;;
(cgi-server) need_cgi=1;;
(c++2) need_cxx=1;;
(abyss-server) need_abyss=1;;
(pstream-server) need_pstream=1;;
(packetsocket) need_packetsocket=1;;
(client|libwww-client) need_client=1;;
(--help) show_help 0;;
(--) shift; break;;
(--*) break;;
(*)
echo "Unrecognized token '$1'"
exit 1
;;
esac
shift
done
if test -z "$need_cxx"; then
test -z "$need_client" || comp="$comp xmlrpc_client"
test -z "$need_abyss" || comp="$comp xmlrpc_server_abyss"
test -z "$need_server" || comp="$comp xmlrpc_server"
test -z "$need_cgi" || comp="$comp xmlrpc_server_cgi"
else
test -z "$need_client" || comp="$comp xmlrpc_client++"
test -z "$need_abyss" || comp="$comp xmlrpc_server_abyss++"
test -z "$need_server" || comp="$comp xmlrpc_server++"
test -z "$need_cgi" || comp="$comp xmlrpc_server_cgi++"
fi
test -z "$need_pstream" || comp="$comp xmlrpc_server_pstream++"
test -z "$need_packetsocket" || comp="$comp xmlrpc_packetsocket"
test -n "$comp" || comp="xmlrpc xmlrpc_util"
case $1 in
(--features|--modules)
echo "c++ abyss-server curl-client"
exit 0
;;
(--version)
comp=xmlrpc
set -- --modversion
;;
(--exec-prefix)
comp=xmlrpc
set -- --variable=prefix
;;
(--*dir|--prefix)
comp=xmlrpc
set -- --variable=${1##--}
;;
(--ldflags)
set -- --libs-only-L
;;
(--ldadd)
set -- --libs-only-l
;;
(--cflags)
set -- "$1"
;;
esac
exec pkg-config "$@" $comp