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 178
|
#!/bin/sh
# Stolen from rep-config and adapted for use with xmlrpc-c.
# Other bits stolen from gnome-config & automake output.
prefix="@prefix@"
exec_prefix="@exec_prefix@"
bindir="@bindir@"
datadir="@datadir@"
libdir="@libdir@"
includedir="@includedir@"
ENABLE_LIBXML2_BACKEND='@ENABLE_LIBXML2_BACKEND@'
ENABLE_ABYSS_THREADS='@ENABLE_ABYSS_THREADS@'
MUST_BUILD_CURL_CLIENT='@MUST_BUILD_CURL_CLIENT@'
MUST_BUILD_WININET_CLIENT='@MUST_BUILD_WININET_CLIENT@'
MUST_BUILD_LIBWWW_CLIENT='@MUST_BUILD_LIBWWW_CLIENT@'
LSOCKET='@LSOCKET@'
usage="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
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
--exec-prefix The executable prefix under which the package was installed
--*dir The various directories under which the package was installed"
if test $# -eq 0; then
echo "You must specify at least one option."
echo "${usage}" 1>&2
exit 1
fi
if test "${ENABLE_LIBXML2_BACKEND}" = "yes"; then
LIBXML=`xml2-config --libs`
else
LIBXML="-lxmlrpc_xmlparse -lxmlrpc_xmltok"
fi
needCpp=no
the_libdirs=
# If Xmlrpc-c libraries are installed in the standard linker search
# path on this system, you should remove the following line:
the_libdirs="-L$libdir $the_libdirs"
the_libs="-lxmlrpc -lxmlrpc_util ${LIBXML}"
the_rpath=
the_wl_rpath=
cpp_libs=
cflags=
# If Xmlrpc-c library interface header files are installed in the standard
# compiler search path on this system, you should remove the following line:
cflags="-I$includedir $cflags"
while test $# -gt 0; do
case $1 in
c++)
the_libs="-lxmlrpc_cpp $the_libs"
# Unfortunately, there is just one legacy CPP library for
# everything, and it needs all the C libraries -- base, client,
# and server. So all legacy C++ programs get linked with client
# and server libraries, whether they need them or not.
the_libs="-lxmlrpc_server_abyss $the_libs"
the_libs="-lxmlrpc_server $the_libs"
the_libs="-lxmlrpc_client $the_libs"
;;
c++2)
needCpp=yes
the_libs="-lxmlrpc++ $the_libs"
;;
server-util)
the_libs="-lxmlrpc_server $the_libs"
;;
cgi-server)
the_libs="-lxmlrpc_server $the_libs"
the_libs="-lxmlrpc_server_cgi $the_libs"
;;
abyss-server)
if test "${ENABLE_ABYSS_THREADS}" = "yes"; then
the_libs="-lpthread $the_libs"
fi
the_libs="${LSOCKET} $the_libs"
the_libs="-lxmlrpc_abyss $the_libs"
the_libs="-lxmlrpc_server $the_libs"
the_libs="-lxmlrpc_server_abyss $the_libs"
if test "${needCpp}" = "yes"; then
the_libs="-lxmlrpc_server++ $the_libs"
the_libs="-lxmlrpc_server_abyss++ $the_libs"
fi
;;
client|libwww-client)
# libwww-client is for backward compatibility
the_libs="-lxmlrpc_client $the_libs"
if test "${MUST_BUILD_WININET_CLIENT}" = "yes"; then
the_libs="@WININET_LDADD@ $the_libs"
the_rpath="@WININET_RPATH@ $the_rpath"
the_wl_rpath="@WININET_WL_RPATH@ $the_wl_rpath"
fi
if test "${MUST_BUILD_CURL_CLIENT}" = "yes"; then
the_libs="@CURL_LDADD@ $the_libs"
the_rpath="@CURL_RPATH@ $the_rpath"
the_wl_rpath="@CURL_WL_RPATH@ $the_wl_rpath"
fi
if test "${MUST_BUILD_LIBWWW_CLIENT}" = "yes"; then
the_libs="@LIBWWW_LDADD@ $the_libs"
the_rpath="@LIBWWW_RPATH@ $the_rpath"
the_wl_rpath="@LIBWWW_WL_RPATH@ $the_wl_rpath"
fi
if test "${needCpp}" = "yes"; then
the_libs="-lxmlrpc_client++ $the_libs"
fi
;;
--version)
echo "@VERSION@"
;;
--modules)
echo "@FEATURE_LIST@"
;;
--features)
echo "@FEATURE_LIST@"
;;
--cflags)
echo "$cflags"
;;
--libs)
echo "$the_libdirs $the_libs $the_wl_rpath"
;;
--ldadd)
echo "$the_libdirs $the_libs"
;;
--ldflags)
echo "$the_rpath"
;;
--prefix)
echo "@prefix@"
;;
--exec-prefix)
echo "@exec_prefix@"
;;
--*dir)
# Swiped from gnome-config.
dirname=\$`echo $1 | sed -e 's,^--,,'`
dirname=`eval echo $dirname`
test -z "$dirname" && exit 1
echo $dirname
;;
--help)
echo "${usage}" 1>&2
;;
*)
echo "Unrecognized token '$1'"
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done
exit 0
|