2 # This is like 'xmlrpc-c-config', but for testing Xmlrpc-c from its build
3 # directory instead of for an installed instance of Xmlrpc-c.
5 # For example, the make file in the examples/ directory uses this program
6 # to link the example programs with the Xmlrpc-c libraries in the build
7 # directory. A real application program would instead use xmlrpc-c-config
8 # and get the Xmlrpc-c libraries from their installed home.
10 # @srcdir@ and @top_srcdir@ are useless because they can be relative.
12 SRCDIR="@BUILDDIR@" # until we figure out how to do it right
14 ENABLE_LIBXML2_BACKEND="@ENABLE_LIBXML2_BACKEND@"
15 ENABLE_ABYSS_THREADS="@ENABLE_ABYSS_THREADS@"
16 MUST_BUILD_CURL_CLIENT="@MUST_BUILD_CURL_CLIENT@"
17 MUST_BUILD_WININET_CLIENT="@MUST_BUILD_WININET_CLIENT@"
18 MUST_BUILD_LIBWWW_CLIENT="@MUST_BUILD_LIBWWW_CLIENT@"
21 if test $# -eq 0; then
22 echo "You need to specify arguments"
28 if test "${ENABLE_LIBXML2_BACKEND}" = "yes"; then
29 LIBXML=`xml2-config --libs`
31 LIBXML="${BUILDDIR}/lib/expat/xmlparse/.libs/libxmlrpc_xmlparse.a"
32 sopath="${BUILDDIR}/lib/expat/xmlparse/.libs:$sopath"
33 LIBXML="${LIBXML} ${BUILDDIR}/lib/expat/xmltok/.libs/libxmlrpc_xmltok.a"
34 sopath="${BUILDDIR}/lib/expat/xmltok/.libs:$sopath"
39 LIBXMLRPC="${BUILDDIR}/src/.libs/libxmlrpc.a"
40 LIBXMLRPC_UTIL="${BUILDDIR}/lib/libutil/.libs/libxmlrpc_util.a"
42 the_libs="${LIBXMLRPC} ${LIBXMLRPC_UTIL} ${LIBXML}"
43 the_includes="-I${SRCDIR}/include"
44 sopath="${BUILDDIR}/src/.libs:$sopath"
46 while test $# -gt 0; do
49 # Unfortunately, there is just one legacy CPP library for
50 # everything, and it needs all the C libraries -- base, client,
51 # and server. So all legacy C++ programs get linked with client
52 # and server libraries, whether they need them or not.
54 the_libs="${BUILDDIR}/src/.libs/libxmlrpc_server.a $the_libs"
55 the_libs="${BUILDDIR}/src/.libs/libxmlrpc_server_abyss.a $the_libs"
56 the_libs="${BUILDDIR}/src/.libs/libxmlrpc_client.a $the_libs"
57 the_libs="${BUILDDIR}/src/cpp/libxmlrpc_cpp.a $the_libs"
61 the_libs="${BUILDDIR}/src/cpp/libxmlrpc++.a $the_libs"
64 the_libs="${BUILDDIR}/src/.libs/libxmlrpc_server.a $the_libs"
67 the_libs="${BUILDDIR}/src/.libs/libxmlrpc_server.a $the_libs"
68 the_libs="${BUILDDIR}/src/.libs/libxmlrpc_server_cgi.a $the_libs"
71 if test "${ENABLE_ABYSS_THREADS}" = "yes"; then
72 the_libs="-lpthread $the_libs"
74 the_libs="${LSOCKET} $the_libs"
75 the_libs="${BUILDDIR}/lib/abyss/src/.libs/libxmlrpc_abyss.a $the_libs"
76 the_libs="${BUILDDIR}/src/.libs/libxmlrpc_server.a $the_libs"
77 the_libs="${BUILDDIR}/src/.libs/libxmlrpc_server_abyss.a $the_libs"
78 if test "${needCpp}" = "yes"; then
79 the_libs="${BUILDDIR}/src/cpp/libxmlrpc_server++.a $the_libs"
80 the_libs="${BUILDDIR}/src/cpp/libxmlrpc_server_abyss++.a $the_libs"
82 the_includes="-I${SRCDIR}/lib/abyss/src $the_includes"
83 sopath="${BUILDDIR}/lib/abyss/src/.libs:$sopath"
86 the_libs="${BUILDDIR}/src/.libs/libxmlrpc_client.a $the_libs"
87 if test "${MUST_BUILD_WININET_CLIENT}" = "yes"; then
88 the_libs="@WININET_LDADD@ $the_libs"
89 the_rpath="@WININET_RPATH@ $the_rpath"
90 the_wl_rpath="@WININET_WL_RPATH@ $the_wl_rpath"
92 if test "${MUST_BUILD_CURL_CLIENT}" = "yes"; then
93 the_libs="@CURL_LDADD@ $the_libs"
94 the_rpath="@CURL_RPATH@ $the_rpath"
95 the_wl_rpath="@CURL_WL_RPATH@ $the_wl_rpath"
97 if test "${MUST_BUILD_LIBWWW_CLIENT}" = "yes"; then
98 the_libs="@LIBWWW_LDADD@ $the_libs"
99 the_rpath="@LIBWWW_RPATH@ $the_rpath"
100 the_wl_rpath="@LIBWWW_WL_RPATH@ $the_wl_rpath"
102 if test "${needCpp}" = "yes"; then
103 the_libs="${BUILDDIR}/src/cpp/libxmlrpc_client++.a $the_libs"
110 echo "@FEATURE_LIST@"
113 echo "@FEATURE_LIST@"
119 echo "$the_libdirs $the_libs $the_wl_rpath"
122 echo "$the_libdirs $the_libs"
137 # Swiped from gnome-config.
138 dirname=\$`echo $1 | sed -e 's,^--,,'`
139 dirname=`eval echo $dirname`
140 test -z "$dirname" && exit 1
144 echo "See the real xmlrpc-c-config program" 1>&2
147 echo "Unrecognized token '$1'"