2 # Stolen from rep-config and adapted for use with xmlrpc-c.
3 # Other bits stolen from gnome-config & automake output.
6 exec_prefix="@exec_prefix@"
11 includedir="@includedir@"
13 ENABLE_LIBXML2_BACKEND='@ENABLE_LIBXML2_BACKEND@'
14 ENABLE_ABYSS_THREADS='@ENABLE_ABYSS_THREADS@'
15 MUST_BUILD_CURL_CLIENT='@MUST_BUILD_CURL_CLIENT@'
16 MUST_BUILD_WININET_CLIENT='@MUST_BUILD_WININET_CLIENT@'
17 MUST_BUILD_LIBWWW_CLIENT='@MUST_BUILD_LIBWWW_CLIENT@'
20 usage="Usage: xmlrpc-c-config <feature> ... <option> ...
23 c++ legacy C++ wrapper API
25 client client functions
26 cgi-server CGI-based server functions
27 abyss-server ABYSS-based server functions
28 server-util basic server functions (implied by *-server)
31 --version The version number of the package
32 --features List all features (aka modules) currently installed
33 --cflags C compiler flags to use when '#include'ing package headers
34 --libs Libraries and flags to use when linking programs normally
35 --ldadd Libraries to use with automake
36 --ldflags Flags to use with automake & libtool
37 --prefix The prefix under which the package was installed
38 --exec-prefix The executable prefix under which the package was installed
39 --*dir The various directories under which the package was installed"
41 if test $# -eq 0; then
42 echo "You must specify at least one option."
47 if test "${ENABLE_LIBXML2_BACKEND}" = "yes"; then
48 LIBXML=`xml2-config --libs`
50 LIBXML="-lxmlrpc_xmlparse -lxmlrpc_xmltok"
57 # If Xmlrpc-c libraries are installed in the standard linker search
58 # path on this system, you should remove the following line:
59 the_libdirs="-L$libdir $the_libdirs"
61 the_libs="-lxmlrpc -lxmlrpc_util ${LIBXML}"
67 # If Xmlrpc-c library interface header files are installed in the standard
68 # compiler search path on this system, you should remove the following line:
69 cflags="-I$includedir $cflags"
71 while test $# -gt 0; do
74 the_libs="-lxmlrpc_cpp $the_libs"
76 # Unfortunately, there is just one legacy CPP library for
77 # everything, and it needs all the C libraries -- base, client,
78 # and server. So all legacy C++ programs get linked with client
79 # and server libraries, whether they need them or not.
81 the_libs="-lxmlrpc_server_abyss $the_libs"
82 the_libs="-lxmlrpc_server $the_libs"
83 the_libs="-lxmlrpc_client $the_libs"
87 the_libs="-lxmlrpc++ $the_libs"
90 the_libs="-lxmlrpc_server $the_libs"
93 the_libs="-lxmlrpc_server $the_libs"
94 the_libs="-lxmlrpc_server_cgi $the_libs"
97 if test "${ENABLE_ABYSS_THREADS}" = "yes"; then
98 the_libs="-lpthread $the_libs"
100 the_libs="${LSOCKET} $the_libs"
101 the_libs="-lxmlrpc_abyss $the_libs"
102 the_libs="-lxmlrpc_server $the_libs"
103 the_libs="-lxmlrpc_server_abyss $the_libs"
104 if test "${needCpp}" = "yes"; then
105 the_libs="-lxmlrpc_server++ $the_libs"
106 the_libs="-lxmlrpc_server_abyss++ $the_libs"
109 client|libwww-client)
110 # libwww-client is for backward compatibility
111 the_libs="-lxmlrpc_client $the_libs"
113 if test "${MUST_BUILD_WININET_CLIENT}" = "yes"; then
114 the_libs="@WININET_LDADD@ $the_libs"
115 the_rpath="@WININET_RPATH@ $the_rpath"
116 the_wl_rpath="@WININET_WL_RPATH@ $the_wl_rpath"
118 if test "${MUST_BUILD_CURL_CLIENT}" = "yes"; then
119 the_libs="@CURL_LDADD@ $the_libs"
120 the_rpath="@CURL_RPATH@ $the_rpath"
121 the_wl_rpath="@CURL_WL_RPATH@ $the_wl_rpath"
123 if test "${MUST_BUILD_LIBWWW_CLIENT}" = "yes"; then
124 the_libs="@LIBWWW_LDADD@ $the_libs"
125 the_rpath="@LIBWWW_RPATH@ $the_rpath"
126 the_wl_rpath="@LIBWWW_WL_RPATH@ $the_wl_rpath"
128 if test "${needCpp}" = "yes"; then
129 the_libs="-lxmlrpc_client++ $the_libs"
136 echo "@FEATURE_LIST@"
139 echo "@FEATURE_LIST@"
145 echo "$the_libdirs $the_libs $the_wl_rpath"
148 echo "$the_libdirs $the_libs"
160 # Swiped from gnome-config.
161 dirname=\$`echo $1 | sed -e 's,^--,,'`
162 dirname=`eval echo $dirname`
163 test -z "$dirname" && exit 1
170 echo "Unrecognized token '$1'"