/[packages]/cauldron/xmlrpc-c/current/SOURCES/xmlrpc-c-cmake.patch
ViewVC logotype

Contents of /cauldron/xmlrpc-c/current/SOURCES/xmlrpc-c-cmake.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6159 - (show annotations) (download)
Tue Jan 11 19:04:14 2011 UTC (10 years, 8 months ago) by pterjan
File size: 58114 byte(s)
imported package xmlrpc-c
1 From afe99001ee31f4cf827fc6aee0b2088bd4e7b85b Mon Sep 17 00:00:00 2001
2 From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
3 Date: Sat, 5 Apr 2008 10:55:02 +0200
4 Subject: [PATCH 1/6] make -> cmake transition
5
6 ---
7 CMakeLists.txt | 275 +++++++++++++++++++++++++++
8 cmake/try-attr.cc | 3 +
9 cmake/va-list-is-array.c | 9 +
10 examples/CMakeLists.txt | 57 ++++++
11 examples/config.h | 1 +
12 examples/cpp/CMakeLists.txt | 34 ++++
13 include/CMakeLists.txt | 3 +
14 include/xmlrpc-c/CMakeLists.txt | 73 +++++++
15 include/xmlrpc-c/config.h.cmake | 30 +++
16 lib/CMakeLists.txt | 12 ++
17 lib/abyss/CMakeLists.txt | 3 +
18 lib/abyss/src/CMakeLists.txt | 66 +++++++
19 lib/abyss/src/xmlrpc_abyss.pc.cmake | 12 ++
20 lib/curl_transport/CMakeLists.txt | 20 ++
21 lib/expat/CMakeLists.txt | 9 +
22 lib/expat/gennmtab/CMakeLists.txt | 3 +
23 lib/expat/xmlparse/CMakeLists.txt | 7 +
24 lib/expat/xmlparse/xmlrpc_xmlparse.pc.cmake | 12 ++
25 lib/expat/xmltok/CMakeLists.txt | 22 ++
26 lib/expat/xmltok/xmlrpc_xmltok.pc.cmake | 9 +
27 lib/libutil/CMakeLists.txt | 25 +++
28 lib/libutil/xmlrpc_util.pc.cmake | 10 +
29 lib/libwww_transport/CMakeLists.txt | 7 +
30 lib/util/CMakeLists.txt | 17 ++
31 lib/wininet_transport/CMakeLists.txt | 7 +
32 src/CMakeLists.txt | 121 ++++++++++++
33 src/cpp/CMakeLists.txt | 70 +++++++
34 src/cpp/test/CMakeLists.txt | 17 ++
35 src/cpp/xmlrpc++.pc.cmake | 12 ++
36 src/cpp/xmlrpc_client++.pc.cmake | 12 ++
37 src/cpp/xmlrpc_cpp.pc.cmake | 12 ++
38 src/cpp/xmlrpc_packetsocket.pc.cmake | 12 ++
39 src/cpp/xmlrpc_server++.pc.cmake | 12 ++
40 src/cpp/xmlrpc_server_abyss++.pc.cmake | 12 ++
41 src/cpp/xmlrpc_server_cgi++.pc.cmake | 12 ++
42 src/cpp/xmlrpc_server_pstream++.pc.cmake | 12 ++
43 src/test/CMakeLists.txt | 37 ++++
44 src/xmlrpc.pc.cmake | 12 ++
45 src/xmlrpc_client.pc.cmake | 12 ++
46 src/xmlrpc_server.pc.cmake | 12 ++
47 src/xmlrpc_server_abyss.pc.cmake | 12 ++
48 src/xmlrpc_server_cgi.pc.cmake | 12 ++
49 tools/CMakeLists.txt | 21 ++
50 tools/binmode-rpc-kit/CMakeLists.txt | 2 +
51 tools/lib/CMakefiles.txt | 1 +
52 tools/turbocharger/CMakeLists.txt | 1 +
53 tools/xml-rpc-api2cpp/CMakeLists.txt | 15 ++
54 tools/xml-rpc-api2txt/CMakeLists.txt | 7 +
55 tools/xmlrpc/CMakeLists.txt | 17 ++
56 tools/xmlrpc/config.h | 1 +
57 tools/xmlrpc_cpp_proxy/CMakeLists.txt | 17 ++
58 tools/xmlrpc_pstream/CMakeLists.txt | 16 ++
59 tools/xmlrpc_transport/CMakeLists.txt | 9 +
60 tools/xmlrpc_transport/config.h | 1 +
61 transport_config.h.cmake | 16 ++
62 version.h.cmake | 5 +
63 xmlrpc-c-config | 108 +++++++++++
64 xmlrpc_config.h.cmake | 105 ++++++++++
65 58 files changed, 1469 insertions(+), 0 deletions(-)
66 create mode 100644 CMakeLists.txt
67 create mode 100644 cmake/try-attr.cc
68 create mode 100644 cmake/va-list-is-array.c
69 create mode 100644 examples/CMakeLists.txt
70 create mode 100644 examples/config.h
71 create mode 100644 examples/cpp/CMakeLists.txt
72 create mode 100644 include/CMakeLists.txt
73 create mode 100644 include/xmlrpc-c/CMakeLists.txt
74 create mode 100644 include/xmlrpc-c/config.h.cmake
75 create mode 100644 lib/CMakeLists.txt
76 create mode 100644 lib/abyss/CMakeLists.txt
77 create mode 100644 lib/abyss/src/CMakeLists.txt
78 create mode 100644 lib/abyss/src/xmlrpc_abyss.pc.cmake
79 create mode 100644 lib/curl_transport/CMakeLists.txt
80 create mode 100644 lib/expat/CMakeLists.txt
81 create mode 100644 lib/expat/gennmtab/CMakeLists.txt
82 create mode 100644 lib/expat/xmlparse/CMakeLists.txt
83 create mode 100644 lib/expat/xmlparse/xmlrpc_xmlparse.pc.cmake
84 create mode 100644 lib/expat/xmltok/CMakeLists.txt
85 create mode 100644 lib/expat/xmltok/xmlrpc_xmltok.pc.cmake
86 create mode 100644 lib/libutil/CMakeLists.txt
87 create mode 100644 lib/libutil/xmlrpc_util.pc.cmake
88 create mode 100644 lib/libwww_transport/CMakeLists.txt
89 create mode 100644 lib/util/CMakeLists.txt
90 create mode 100644 lib/wininet_transport/CMakeLists.txt
91 create mode 100644 src/CMakeLists.txt
92 create mode 100644 src/cpp/CMakeLists.txt
93 create mode 100644 src/cpp/test/CMakeLists.txt
94 create mode 100644 src/cpp/xmlrpc++.pc.cmake
95 create mode 100644 src/cpp/xmlrpc_client++.pc.cmake
96 create mode 100644 src/cpp/xmlrpc_cpp.pc.cmake
97 create mode 100644 src/cpp/xmlrpc_packetsocket.pc.cmake
98 create mode 100644 src/cpp/xmlrpc_server++.pc.cmake
99 create mode 100644 src/cpp/xmlrpc_server_abyss++.pc.cmake
100 create mode 100644 src/cpp/xmlrpc_server_cgi++.pc.cmake
101 create mode 100644 src/cpp/xmlrpc_server_pstream++.pc.cmake
102 create mode 100644 src/test/CMakeLists.txt
103 create mode 100644 src/xmlrpc.pc.cmake
104 create mode 100644 src/xmlrpc_client.pc.cmake
105 create mode 100644 src/xmlrpc_server.pc.cmake
106 create mode 100644 src/xmlrpc_server_abyss.pc.cmake
107 create mode 100644 src/xmlrpc_server_cgi.pc.cmake
108 create mode 100644 tools/CMakeLists.txt
109 create mode 100644 tools/binmode-rpc-kit/CMakeLists.txt
110 create mode 100644 tools/lib/CMakefiles.txt
111 create mode 100644 tools/turbocharger/CMakeLists.txt
112 create mode 100644 tools/xml-rpc-api2cpp/CMakeLists.txt
113 create mode 100644 tools/xml-rpc-api2txt/CMakeLists.txt
114 create mode 100644 tools/xmlrpc/CMakeLists.txt
115 create mode 100644 tools/xmlrpc/config.h
116 create mode 100644 tools/xmlrpc_cpp_proxy/CMakeLists.txt
117 create mode 100644 tools/xmlrpc_pstream/CMakeLists.txt
118 create mode 100644 tools/xmlrpc_transport/CMakeLists.txt
119 create mode 100644 tools/xmlrpc_transport/config.h
120 create mode 100644 transport_config.h.cmake
121 create mode 100644 version.h.cmake
122 create mode 100755 xmlrpc-c-config
123 create mode 100644 xmlrpc_config.h.cmake
124
125 diff --git a/CMakeLists.txt b/CMakeLists.txt
126 new file mode 100644
127 index 0000000..f64b143
128 --- /dev/null
129 +++ b/CMakeLists.txt
130 @@ -0,0 +1,275 @@
131 +## -*- cmake -*-
132 +project(xmlrpc-c)
133 +include(FindPkgConfig)
134 +include(CheckIncludeFile)
135 +include(CheckFunctionExists)
136 +
137 +cmake_minimum_required(VERSION 2.6)
138 +
139 +
140 +set(XMLRPC_C_VERSION_MAJOR "1" CACHE STRING "Version (major) of xmlrpc-c")
141 +set(XMLRPC_C_VERSION_MINOR "20" CACHE STRING "Version (minor) of xmlrpc-c")
142 +set(XMLRPC_C_VERSION_POINT "03" CACHE STRING "Version (point) of xmlrpc-c")
143 +
144 +set(XMLRPC_C_VERSION
145 + "${XMLRPC_C_VERSION_MAJOR}.${XMLRPC_C_VERSION_MINOR}.${XMLRPC_C_VERSION_POINT}"
146 + CACHE STRING "Version of xmlrpc-c")
147 +
148 +set(XMLRPC_C_LIBVERSION "3.${XMLRPC_C_VERSION_MINOR}")
149 +set(XMLRPC_C_SOVERSION "3")
150 +
151 +set(XMLRPC_CXX_LIBVERSION "6.${XMLRPC_C_VERSION_MINOR}")
152 +set(XMLRPC_CXX_SOVERSION "6")
153 +
154 +string(REGEX REPLACE "^0+" "" XMLRPC_C_VERSION_MAJOR_NUM "${XMLRPC_C_VERSION_MAJOR}")
155 +string(REGEX REPLACE "^0+" "" XMLRPC_C_VERSION_MINOR_NUM "${XMLRPC_C_VERSION_MINOR}")
156 +string(REGEX REPLACE "^0+" "" XMLRPC_C_VERSION_POINT_NUM "${XMLRPC_C_VERSION_POINT}")
157 +
158 +
159 +macro(ensc_set_bool NAME VALUE DESC)
160 + set(${NAME} ${VALUE} CACHE BOOL ${DESC})
161 + if(${NAME})
162 + set(_${NAME} 1)
163 + else(${NAME})
164 + set(_${NAME} 0)
165 + endif(${NAME})
166 +endmacro(ensc_set_bool)
167 +
168 +macro(ensc_pkgconfig COMP)
169 + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${COMP}.pc.cmake
170 + ${CMAKE_CURRENT_BINARY_DIR}/${COMP}.pc
171 + @ONLY)
172 + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${COMP}.pc
173 + DESTINATION ${pkgconfdir})
174 +endmacro(ensc_pkgconfig)
175 +
176 +macro(ensc_pkgconfig_lib TARGET LIBS)
177 + get_target_property(libtype ${TARGET} TYPE)
178 + if("${libtype}" STREQUAL "STATIC_LIBRARY")
179 + list(APPEND ${TARGET}_pkgconfig_libs "${LIBS}")
180 + endif("${libtype}" STREQUAL "STATIC_LIBRARY")
181 +endmacro(ensc_pkgconfig_lib)
182 +
183 +macro(ensc_set_link_exe_flags)
184 + ## HACK: libwww has broken inter-lib dependencies and '-Wl,--as-needed' fails with it
185 + if(NOT MUST_BUILD_LIBWWW_CLIENT)
186 + set_target_properties(${ARGV}
187 + PROPERTIES
188 + LINK_FLAGS ${XMLRPC_LINKER_FLAGS})
189 + endif(NOT MUST_BUILD_LIBWWW_CLIENT)
190 +endmacro(ensc_set_link_exe_flags)
191 +
192 +###########
193 +if(WIN32)
194 + find_program(WININET_CONFIG_EXECUTABLE wininet-config)
195 +
196 + if(DEFINED MUST_BUILD_WININET_CLIENT)
197 + set(tmp ${MUST_BUILD_WININET_CLIENT})
198 + else(DEFINED MUST_BUILD_WININET_CLIENT)
199 + if(WININET_CONFIG_EXECUTABLE)
200 + set(tmp 1)
201 + else(WININET_CONFIG_EXECUTABLE)
202 + set(tmp 0)
203 + endif(WININET_CONFIG_EXECUTABLE)
204 + endif(DEFINED MUST_BUILD_WININET_CLIENT)
205 +else(WIN32)
206 + set(tmp 0)
207 +endif(WIN32)
208 +
209 +if(tmp)
210 + set(MUST_BUILD_CLIENT 1)
211 + exec_program(${WININET_CONFIG_EXECUTABLE} ARGS --version OUTPUT_VARIABLE WININET_VERSION)
212 + exec_program(${WININET_CONFIG_EXECUTABLE} ARGS --cflags OUTPUT_VARIABLE WININET_CFLAGS)
213 + exec_program(${WININET_CONFIG_EXECUTABLE} ARGS --libs OUTPUT_VARIABLE WININET_LDADD)
214 + message(STATUS "Using WinInet ${WININET_VERSION} transport")
215 +endif(tmp)
216 +
217 +ensc_set_bool(MUST_BUILD_WININET_CLIENT ${tmp} "Set iff WinInet client transport shall be built")
218 +set(wininet_srcdir ${xmlrpc-c_SOURCE_DIR}/lib/wininet_transport)
219 +
220 +###########
221 +if(DEFINED MUST_BUILD_CURL_CLIENT)
222 + set(tmp REQUIRED)
223 +else(DEFINED MUST_BUILD_CURL_CLIENT)
224 + set(tmp)
225 +endif(DEFINED MUST_BUILD_CURL_CLIENT)
226 +
227 +pkg_check_modules(CURL ${tmp} libcurl)
228 +
229 +ensc_set_bool(MUST_BUILD_CURL_CLIENT ${CURL_FOUND} "Set iff Curl client transport shall be built")
230 +set(curl_srcdir ${xmlrpc-c_SOURCE_DIR}/lib/curl_transport)
231 +
232 +if(MUST_BUILD_CURL_CLIENT)
233 + set(MUST_BUILD_CLIENT 1)
234 +endif(MUST_BUILD_CURL_CLIENT)
235 +
236 +###########
237 +find_program(LIBWWW_CONFIG_EXECUTABLE libwww-config)
238 +if(DEFINED MUST_BUILD_LIBWWW_CLIENT)
239 + set(tmp ${MUST_BUILD_LIBWWW_CLIENT})
240 +else(DEFINED MUST_BUILD_LIBWWW_CLIENT)
241 + if(LIBWWW_CONFIG_EXECUTABLE)
242 + set(tmp 1)
243 + else(LIBWWW_CONFIG_EXECUTABLE)
244 + set(tmp 0)
245 + endif(LIBWWW_CONFIG_EXECUTABLE)
246 +endif(DEFINED MUST_BUILD_LIBWWW_CLIENT)
247 +
248 +if(tmp)
249 + set(MUST_BUILD_CLIENT 1)
250 + exec_program(${LIBWWW_CONFIG_EXECUTABLE} ARGS --version OUTPUT_VARIABLE LIBWWW_VERSION)
251 + exec_program(${LIBWWW_CONFIG_EXECUTABLE} ARGS --libs OUTPUT_VARIABLE LIBWWW_LIBS)
252 + exec_program(${LIBWWW_CONFIG_EXECUTABLE} ARGS --cflags OUTPUT_VARIABLE LIBWWW_CFLAGS)
253 + message(STATUS "Using libwww ${LIBWWW_VERSION} transport")
254 +endif(tmp)
255 +ensc_set_bool(MUST_BUILD_LIBWWW_CLIENT ${tmp} "Set iff LibWWW client transport shall be built")
256 +set(libwww_srcdir ${xmlrpc-c_SOURCE_DIR}/lib/libwww_transport)
257 +
258 +############
259 +
260 +set(ENABLE_CGI_SERVER 1 CACHE BOOL "Set iff CGI server shall be enabled")
261 +set(ENABLE_CPLUSPLUS 1 CACHE BOOL "Set iff C++ part shall be enabled")
262 +set(ENABLE_ABYSS_SERVER 1 CACHE BOOL "Set iff Abyss server shall be enabled")
263 +set(ENABLE_LIBXML2_BACKEND 1 CACHE BOOL "Set iff libxml2 backend shall be used")
264 +set(ENABLE_ABYSS_SERVER 1 CACHE BOOL "Set iff abyss server shall be enabled")
265 +set(ENABLE_ABYSS_THREADS 1 CACHE BOOL "Use pthread")
266 +
267 +if(ENABLE_LIBXML2_BACKEND)
268 + pkg_check_modules(LIBXML2 libxml-2.0)
269 +
270 + if(LIBXML2_FOUND)
271 + set(libxml_pkgconfig libxml-2.0) # TODO: add more alternative modules
272 + endif(LIBXML2_FOUND)
273 +endif(ENABLE_LIBXML2_BACKEND)
274 +
275 +###########
276 +
277 +set(ENABLE_TOOLS 0 CACHE BOOL "Build the tools")
278 +pkg_check_modules(NCURSES ncurses)
279 +find_library(READLINE readline)
280 +
281 +if (ENABLE_TOOLS)
282 + message(STATUS "Building tools")
283 + if (MUST_BUILD_LIBWWW_CLIENT OR MUST_BUILD_WININET_CLIENT OR MUST_BUILD_CURL_CLIENT)
284 + if (NCURSES_FOUND AND READLINE)
285 + set(BUILD_XMLRPC_PSTREAM 1)
286 + message(STATUS "Building xmlrpc_pstream tool")
287 + endif()
288 + set(BUILD_TOOLS 1)
289 + endif()
290 +endif()
291 +
292 +#### <wchar.h> tests
293 +check_include_file(wchar.h _have_wchar_h)
294 +if(_have_wchar_h)
295 + set(HAVE_WCHAR_H 1)
296 +else(_have_wchar_h)
297 + set(HAVE_WCHAR_H 1)
298 +endif(_have_wchar_h)
299 +set(XMLRPC_HAVE_WCHAR ${HAVE_WCHAR_H})
300 +set(HAVE_WCHAR_H_DEFINE ${HAVE_WCHAR_H})
301 +
302 +
303 +#######
304 +set(LINKER_AS_NEEDED 1 CACHE BOOL "Use the --as-needed linker option")
305 +if(LINKER_AS_NEEDED)
306 + set(XMLRPC_LINKER_FLAGS "-Wl,--as-needed")
307 +endif(LINKER_AS_NEEDED)
308 +
309 +
310 +try_compile(HAVE_ATTR_UNUSED
311 + ${CMAKE_BINARY_DIR}/
312 + ${xmlrpc-c_SOURCE_DIR}/cmake/try-attr.cc
313 + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-DCMAKE_TEST_ATTR=__unused__)
314 +
315 +try_compile(VA_LIST_IS_NOT_ARRAY
316 + ${CMAKE_BINARY_DIR}/
317 + ${xmlrpc-c_SOURCE_DIR}/cmake/va-list-is-array.c)
318 +
319 +if(VA_LIST_IS_NOT_ARRAY)
320 + set(VA_LIST_IS_ARRAY 0)
321 + message(STATUS "va_list is not an array")
322 +else(VA_LIST_IS_NOT_ARRAY)
323 + set(VA_LIST_IS_ARRAY 1)
324 + message(STATUS "va_list is an array")
325 +endif(VA_LIST_IS_NOT_ARRAY)
326 +
327 +
328 +if(HAVE_ATTR_UNUSED)
329 + set(ATTR_UNUSED "__attribute__((__unused__))")
330 +endif(HAVE_ATTR_UNUSED)
331 +
332 +if(WIN32)
333 + set(DIRECTORY_SEPARATOR "\\")
334 +else(WIN32)
335 + set(DIRECTORY_SEPARATOR "/")
336 +endif(WIN32)
337 +
338 +check_include_file(sys/filio.h HAVE_SYS_FILIO_H)
339 +check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H)
340 +check_function_exists(setenv HAVE_SETENV)
341 +check_function_exists(strcasecmp HAVE_STRCASECMP)
342 +check_function_exists(_stricmp HAVE__STRICMP)
343 +check_function_exists(stricmp HAVE_STRICMP)
344 +check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
345 +check_function_exists(setgroups HAVE_SETGROUPS)
346 +check_function_exists(asprintf HAVE_ASPRINTF)
347 +check_function_exists(pselect HAVE_PSELECT)
348 +check_function_exists(wcsncmp HAVE_WCSNCMP)
349 +check_function_exists(localtime_r HAVE_LOCALTIME_R)
350 +check_function_exists(gmtime_r HAVE_GMTIME_R)
351 +
352 +
353 +configure_file(${xmlrpc-c_SOURCE_DIR}/xmlrpc_config.h.cmake
354 + ${xmlrpc-c_BINARY_DIR}/xmlrpc_config.h
355 + ESCAPE_QUOTES @ONLY)
356 +
357 +configure_file(${xmlrpc-c_SOURCE_DIR}/version.h.cmake
358 + ${xmlrpc-c_BINARY_DIR}/version.h
359 + ESCAPE_QUOTES @ONLY)
360 +
361 +configure_file(${xmlrpc-c_SOURCE_DIR}/transport_config.h.cmake
362 + ${xmlrpc-c_BINARY_DIR}/transport_config.h
363 + ESCAPE_QUOTES @ONLY)
364 +
365 +configure_file(${xmlrpc-c_SOURCE_DIR}/include/xmlrpc-c/config.h.cmake
366 + ${xmlrpc-c_BINARY_DIR}/include/xmlrpc-c/config.h
367 + ESCAPE_QUOTES @ONLY)
368 +
369 +
370 +include_directories(${xmlrpc-c_SOURCE_DIR}/include)
371 +include_directories(${xmlrpc-c_BINARY_DIR}/include)
372 +include_directories(${xmlrpc-c_SOURCE_DIR}/lib/util/include)
373 +include_directories(${xmlrpc-c_BINARY_DIR})
374 +
375 +add_custom_target(dist
376 + rm -rf _dist && mkdir -p _dist/xmlrpc-c-${XMLRPC_C_VERSION}
377 + COMMAND cp -a ${xmlrpc-c_SOURCE_DIR}/* _dist/xmlrpc-c-${XMLRPC_C_VERSION}/
378 + COMMAND cd _dist && tar cjf ../xmlrpc-c-${XMLRPC_C_VERSION}.tar.bz2 xmlrpc-c-${XMLRPC_C_VERSION} --exclude=.git --exclude=CVS --exclude=.svn
379 + )
380 +
381 +set(_lib lib CACHE STRING "Basename of the library-directory; usually 'lib' or 'lib64' (on multilib archs)")
382 +set(_bin bin CACHE STRING "Basename of the bin-directory; usually 'bin'")
383 +set(prefix ${CMAKE_INSTALL_PREFIX})
384 +set(libdir "${prefix}/${_lib}")
385 +set(bindir "${prefix}/${_bin}")
386 +set(mandir "${prefix}/share/man")
387 +set(pkgconfdir "${libdir}/pkgconfig")
388 +set(includedir "${prefix}/include")
389 +
390 +#############
391 +
392 +install(PROGRAMS xmlrpc-c-config DESTINATION ${_bin})
393 +
394 +enable_testing()
395 +
396 +add_subdirectory(lib)
397 +add_subdirectory(Windows)
398 +add_subdirectory(doc)
399 +add_subdirectory(examples)
400 +add_subdirectory(include)
401 +add_subdirectory(src)
402 +
403 +if (BUILD_TOOLS)
404 + add_subdirectory(tools)
405 +endif()
406 diff --git a/cmake/try-attr.cc b/cmake/try-attr.cc
407 new file mode 100644
408 index 0000000..4668c5b
409 --- /dev/null
410 +++ b/cmake/try-attr.cc
411 @@ -0,0 +1,3 @@
412 +int x __attribute__((CMAKE_TEST_ATTR));
413 +
414 +int main() {}
415 diff --git a/cmake/va-list-is-array.c b/cmake/va-list-is-array.c
416 new file mode 100644
417 index 0000000..1ad0bab
418 --- /dev/null
419 +++ b/cmake/va-list-is-array.c
420 @@ -0,0 +1,9 @@
421 +#include <stdarg.h>
422 +
423 +void foo()
424 +{
425 + va_list list1, list2;
426 + list1 = list2;
427 +}
428 +
429 +int main() {}
430 diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
431 new file mode 100644
432 index 0000000..6e18556
433 --- /dev/null
434 +++ b/examples/CMakeLists.txt
435 @@ -0,0 +1,57 @@
436 +# -*- cmake -*-
437 +
438 +include_directories(${CMAKE_CURRENT_BINARY_DIR})
439 +
440 +macro(ensc_add_example name ext class)
441 + # HACK: avoid name collision of c and c++ program
442 + if("${ext}" STREQUAL "cpp")
443 + set(_target ${name}++)
444 + else("${ext}" STREQUAL "cpp")
445 + set(_target ${name})
446 + endif("${ext}" STREQUAL "cpp")
447 +
448 + add_executable(${_target} ${name}.${ext})
449 + target_link_libraries(${_target} ${${class}_LIBS})
450 + list(APPEND ${class}_TARGETS ${_target})
451 + list(APPEND example_TARGETS ${_target})
452 +endmacro(ensc_add_example)
453 +
454 +if(ENABLE_CPLUSPLUS)
455 + add_subdirectory(cpp)
456 +endif(ENABLE_CPLUSPLUS)
457 +
458 +
459 +
460 +if(MUST_BUILD_CLIENT)
461 + set(client_LIBS xmlrpc_client)
462 +
463 + ensc_add_example(auth_client c client)
464 + ensc_add_example(synch_client c client)
465 + ensc_add_example(xmlrpc_sample_add_client c client)
466 + ensc_add_example(xmlrpc_asynch_client c client)
467 +endif(MUST_BUILD_CLIENT)
468 +
469 +if(MUST_BUILD_CURL_CLIENT)
470 + set(client_LIBS xmlrpc_client)
471 +
472 + ensc_add_example(interrupted_client c client)
473 +endif(MUST_BUILD_CURL_CLIENT)
474 +
475 +if(ENABLE_CGI_SERVER)
476 + set(cgi_server_LIBS xmlrpc_server_cgi)
477 +
478 + ensc_add_example(xmlrpc_sample_add_server_cgi c cgi_server)
479 +endif(ENABLE_CGI_SERVER)
480 +
481 +if(ENABLE_ABYSS_SERVER)
482 + set(abyss_server_LIBS xmlrpc_server_abyss)
483 +
484 + ensc_add_example(interrupted_server c abyss_server)
485 + ensc_add_example(xmlrpc_inetd_server c abyss_server)
486 + ensc_add_example(xmlrpc_socket_server c abyss_server)
487 + ensc_add_example(xmlrpc_loop_server c abyss_server)
488 + ensc_add_example(xmlrpc_sample_add_server c abyss_server)
489 + ensc_add_example(xmlrpc_server_validatee c abyss_server)
490 +endif(ENABLE_ABYSS_SERVER)
491 +
492 +ensc_set_link_exe_flags(${example_TARGETS})
493 diff --git a/examples/config.h b/examples/config.h
494 new file mode 100644
495 index 0000000..31d5f9b
496 --- /dev/null
497 +++ b/examples/config.h
498 @@ -0,0 +1 @@
499 +#include "../xmlrpc_config.h"
500 diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt
501 new file mode 100644
502 index 0000000..093a75d
503 --- /dev/null
504 +++ b/examples/cpp/CMakeLists.txt
505 @@ -0,0 +1,34 @@
506 +# -*- cmake -*-
507 +
508 +if(ENABLE_ABYSS_SERVER)
509 + set(abyss_serverxx_LIBS xmlrpc_server_abyss++)
510 +
511 + ensc_add_example(xmlrpc_inetd_server cpp abyss_serverxx)
512 + ensc_add_example(xmlrpc_loop_server cpp abyss_serverxx)
513 + ensc_add_example(xmlrpc_sample_add_server cpp abyss_serverxx)
514 + ensc_add_example(callinfo_abyss_server cpp abyss_serverxx)
515 +endif(ENABLE_ABYSS_SERVER)
516 +
517 +if (ENABLE_CGI_SERVER)
518 + set(cgi_serverxx_LIBS xmlrpc_server_cgi++)
519 +
520 + ensc_add_example(xmlrpc_sample_add_server_cgi cpp cgi_serverxx)
521 +endif(ENABLE_CGI_SERVER)
522 +
523 +if(MUST_BUILD_CLIENT)
524 + set(abyss_clientxx_LIBS xmlrpc_client++)
525 +
526 + ensc_add_example(xmlrpc_sample_add_client cpp abyss_clientxx)
527 + ensc_add_example(sample_add_client_complex cpp abyss_clientxx)
528 + ensc_add_example(asynch_client cpp abyss_clientxx)
529 +
530 + ensc_add_example(pstream_client cpp abyss_clientxx)
531 +endif(MUST_BUILD_CLIENT)
532 +
533 +set(pstream_serverxx_LIBS xmlrpc_server_pstream++)
534 +ensc_add_example(pstream_inetd_server cpp pstream_serverxx)
535 +ensc_add_example(pstream_serial_server cpp pstream_serverxx)
536 +
537 +
538 +
539 +ensc_set_link_exe_flags(${example_TARGETS})
540 diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
541 new file mode 100644
542 index 0000000..ebfdba5
543 --- /dev/null
544 +++ b/include/CMakeLists.txt
545 @@ -0,0 +1,3 @@
546 +# -*- cmake -*-
547 +
548 +add_subdirectory(xmlrpc-c)
549 diff --git a/include/xmlrpc-c/CMakeLists.txt b/include/xmlrpc-c/CMakeLists.txt
550 new file mode 100644
551 index 0000000..2b305b7
552 --- /dev/null
553 +++ b/include/xmlrpc-c/CMakeLists.txt
554 @@ -0,0 +1,73 @@
555 +# -*- cmake -*-
556 +
557 +macro(ensc_install_symlink src dst)
558 + install(CODE "EXECUTE_PROCESS(COMMAND ln -s xmlrpc-c/${src} \$ENV{DESTDIR}${includedir}/${dst})")
559 +endmacro(ensc_install_symlink)
560 +
561 +list(APPEND headers
562 + ${CMAKE_CURRENT_BINARY_DIR}/config.h
563 + inttypes.h
564 + c_util.h
565 + util.h
566 + base.h
567 + abyss.h
568 + abyss_unixsock.h
569 + abyss_winsock.h
570 + server.h
571 + server_abyss.h
572 + server_w32httpsys.h
573 + oldxmlrpc.h)
574 +
575 +list(APPEND compat_links "oldxmlrpc.h xmlrpc.h")
576 +list(APPEND compat_links "server.h xmlrpc_server.h")
577 +list(APPEND compat_links "server_abyss.h xmlrpc_abyss.h")
578 +list(APPEND compat_links "server_w32httpsys.h xmlrpc_server_w32httpsys.h")
579 +
580 +
581 +if(ENABLE_CPLUSPLUS)
582 + list(APPEND headers
583 + oldcppwrapper.hpp
584 + girerr.hpp
585 + girmem.hpp
586 + base.hpp
587 + timeout.hpp
588 + xml.hpp
589 + registry.hpp
590 + server_abyss.hpp
591 + packetsocket.hpp
592 + server_pstream.hpp)
593 +
594 + list(APPEND compat_links "oldcppwrapper.hpp XmlRpcCpp.h")
595 +endif(ENABLE_CPLUSPLUS)
596 +
597 +if(MUST_BUILD_CLIENT)
598 + list(APPEND headers
599 + client.h
600 + transport.h
601 + client_global.h)
602 +
603 + list(APPEND compat_links "client.h xmlrpc_client.h")
604 +
605 + if(ENABLE_CPLUSPLUS)
606 + list(APPEND headers
607 + client.hpp
608 + client_transport.hpp
609 + client_simple.hpp)
610 + endif(ENABLE_CPLUSPLUS)
611 +endif(MUST_BUILD_CLIENT)
612 +
613 +if(ENABLE_CGI_SERVER)
614 + list(APPEND headers
615 + server_cgi.h)
616 +
617 + list(APPEND compat_links "server_cgi.h xmlrpc_cgi.h")
618 +endif(ENABLE_CGI_SERVER)
619 +
620 +install(FILES
621 + ${headers}
622 + DESTINATION ${includedir}/xmlrpc-c)
623 +
624 +foreach (ln ${compat_links})
625 + separate_arguments(ln)
626 + ensc_install_symlink(${ln})
627 +endforeach(ln)
628 diff --git a/include/xmlrpc-c/config.h.cmake b/include/xmlrpc-c/config.h.cmake
629 new file mode 100644
630 index 0000000..b2d7373
631 --- /dev/null
632 +++ b/include/xmlrpc-c/config.h.cmake
633 @@ -0,0 +1,30 @@
634 +/* --*- c -*-- */
635 +#ifndef XMLRPC_C_CONFIG_H_INCLUDED
636 +#define XMLRPC_C_CONFIG_H_INCLUDED
637 +
638 +/* This file, part of XML-RPC For C/C++, is meant to
639 + define characteristics of this particular installation
640 + that the other <xmlrpc-c/...> header files need in
641 + order to compile correctly when #included in Xmlrpc-c
642 + user code.
643 +
644 + Those header files #include this one.
645 +
646 + This file was created by a make rule.
647 +*/
648 +#define XMLRPC_HAVE_WCHAR @HAVE_WCHAR_H@
649 +#ifdef WIN32
650 + /* SOCKET is a type defined by <winsock.h>. Anyone who
651 + uses XMLRPC_SOCKET on a WIN32 system must #include
652 + <winsock.h>
653 + */
654 + #define XMLRPC_SOCKET SOCKET
655 + #define XMLRPC_HAVE_TIMEVAL 0
656 + #define XMLRPC_HAVE_TIMESPEC 0
657 +#else
658 + #define XMLRPC_SOCKET int
659 + #define XMLRPC_HAVE_TIMEVAL 1
660 + #define XMLRPC_HAVE_TIMESPEC 1
661 +#endif
662 +
663 +#endif
664 diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
665 new file mode 100644
666 index 0000000..7f8f912
667 --- /dev/null
668 +++ b/lib/CMakeLists.txt
669 @@ -0,0 +1,12 @@
670 +## -*- cmake -*-
671 +
672 +add_subdirectory(abyss)
673 +add_subdirectory(libutil)
674 +add_subdirectory(util)
675 +add_subdirectory(curl_transport)
676 +add_subdirectory(libwww_transport)
677 +add_subdirectory(wininet_transport)
678 +
679 +if(NOT ENABLE_LIBXML2_BACKEND)
680 + add_subdirectory(expat)
681 +endif(NOT ENABLE_LIBXML2_BACKEND)
682 diff --git a/lib/abyss/CMakeLists.txt b/lib/abyss/CMakeLists.txt
683 new file mode 100644
684 index 0000000..2358061
685 --- /dev/null
686 +++ b/lib/abyss/CMakeLists.txt
687 @@ -0,0 +1,3 @@
688 +## -*- cmake -*-
689 +
690 +SUBDIRS(src)
691 diff --git a/lib/abyss/src/CMakeLists.txt b/lib/abyss/src/CMakeLists.txt
692 new file mode 100644
693 index 0000000..e7f89bf
694 --- /dev/null
695 +++ b/lib/abyss/src/CMakeLists.txt
696 @@ -0,0 +1,66 @@
697 +## -*- cmake -*-
698 +
699 +set(xmlrpc_abyss_SOURCES
700 + abyss_info.h
701 + channel.c
702 + channel.h
703 + chanswitch.c
704 + chanswitch.h
705 + conf.c
706 + conn.c
707 + conn.h
708 + data.c
709 + data.h
710 + date.c
711 + date.h
712 + file.c
713 + file.h
714 + handler.c
715 + handler.h
716 + http.c
717 + http.h
718 + init.c
719 + response.c
720 + server.c
721 + server.h
722 + session.c
723 + session.h
724 + socket.c
725 + socket.h
726 + socket_unix.c
727 + socket_unix.h
728 + thread.h
729 + token.c
730 + token.h
731 + trace.c
732 + trace.h)
733 +
734 +add_definitions(-D_UNIX)
735 +
736 +if(ENABLE_ABYSS_THREADS)
737 + list(APPEND xmlrpc_abyss_SOURCES thread_pthread.c)
738 +else(ENABLE_ABYSS_THREADS)
739 + list(APPEND xmlrpc_abyss_SOURCES thread_fork.c)
740 +endif(ENABLE_ABYSS_THREADS)
741 +
742 +add_library(xmlrpc_abyss SHARED ${xmlrpc_abyss_SOURCES})
743 +target_link_libraries(xmlrpc_abyss xmlrpc_util)
744 +
745 +if(ENABLE_ABYSS_THREADS)
746 + set_target_properties(xmlrpc_abyss PROPERTIES DEFINE_SYMBOL _THREAD)
747 + target_link_libraries(xmlrpc_abyss pthread)
748 + ensc_pkgconfig_lib(xmlrpc_abyss "-lpthread")
749 +endif(ENABLE_ABYSS_THREADS)
750 +
751 +install(TARGETS xmlrpc_abyss
752 + RUNTIME DESTINATION ${_bin}
753 + LIBRARY DESTINATION ${_lib}
754 + ARCHIVE DESTINATION ${_lib})
755 +
756 +set_target_properties(xmlrpc_abyss
757 + PROPERTIES
758 + LINK_FLAGS ${XMLRPC_LINKER_FLAGS}
759 + VERSION ${XMLRPC_C_LIBVERSION}
760 + SOVERSION ${XMLRPC_C_SOVERSION})
761 +
762 +ensc_pkgconfig(xmlrpc_abyss)
763 diff --git a/lib/abyss/src/xmlrpc_abyss.pc.cmake b/lib/abyss/src/xmlrpc_abyss.pc.cmake
764 new file mode 100644
765 index 0000000..fae7af3
766 --- /dev/null
767 +++ b/lib/abyss/src/xmlrpc_abyss.pc.cmake
768 @@ -0,0 +1,12 @@
769 +bindir=@bindir@
770 +prefix=@prefix@
771 +libdir=@libdir@
772 +includedir=@includedir@
773 +
774 +Name: xmlrpc_abyss
775 +Description: XMLRPC Abyss base library
776 +Version: @XMLRPC_C_VERSION@
777 +
778 +Requires.private: xmlrpc_util
779 +Libs: -L${libdir} -lxmlrpc_abyss @xmlrpc_abyss_pkgconfig_libs@
780 +Cflags:
781 diff --git a/lib/curl_transport/CMakeLists.txt b/lib/curl_transport/CMakeLists.txt
782 new file mode 100644
783 index 0000000..4224a13
784 --- /dev/null
785 +++ b/lib/curl_transport/CMakeLists.txt
786 @@ -0,0 +1,20 @@
787 +# -*- cmake -*-
788 +
789 +if(MUST_BUILD_CURL_CLIENT)
790 + list(APPEND transport_SOURCES
791 + ${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc_curl_transport.c
792 +
793 + ${CMAKE_CURRENT_SOURCE_DIR}/curltransaction.c
794 + ${CMAKE_CURRENT_SOURCE_DIR}/curltransaction.h
795 +
796 + ${CMAKE_CURRENT_SOURCE_DIR}/curlmulti.c
797 + ${CMAKE_CURRENT_SOURCE_DIR}/curlmulti.h
798 +
799 + ${CMAKE_CURRENT_SOURCE_DIR}/lock.h
800 +
801 + ${CMAKE_CURRENT_SOURCE_DIR}/lock_pthread.c
802 + ${CMAKE_CURRENT_SOURCE_DIR}/lock_pthread.h
803 +
804 + ${CMAKE_CURRENT_SOURCE_DIR}/curlversion.h
805 + )
806 +endif(MUST_BUILD_CURL_CLIENT)
807 diff --git a/lib/expat/CMakeLists.txt b/lib/expat/CMakeLists.txt
808 new file mode 100644
809 index 0000000..7397f52
810 --- /dev/null
811 +++ b/lib/expat/CMakeLists.txt
812 @@ -0,0 +1,9 @@
813 +# -*- cmake -*-
814 +
815 +
816 +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/xmltok)
817 +
818 +add_subdirectory(gennmtab)
819 +add_subdirectory(xmlparse)
820 +add_subdirectory(xmltok)
821 +add_subdirectory(xmlwf)
822 diff --git a/lib/expat/gennmtab/CMakeLists.txt b/lib/expat/gennmtab/CMakeLists.txt
823 new file mode 100644
824 index 0000000..48a44da
825 --- /dev/null
826 +++ b/lib/expat/gennmtab/CMakeLists.txt
827 @@ -0,0 +1,3 @@
828 +# -*- cmake -*-
829 +
830 +ADD_EXECUTABLE(gennmtab gennmtab.c)
831 diff --git a/lib/expat/xmlparse/CMakeLists.txt b/lib/expat/xmlparse/CMakeLists.txt
832 new file mode 100644
833 index 0000000..f87008a
834 --- /dev/null
835 +++ b/lib/expat/xmlparse/CMakeLists.txt
836 @@ -0,0 +1,7 @@
837 +# -*- cmake -*-
838 +
839 +add_library(xmlrpc_xmlparse STATIC
840 + xmlparse.c)
841 +target_link_libraries(xmlrpc_xmlparse xmlrpc_xmltok)
842 +
843 +ensc_pkgconfig(xmlrpc_xmlparse)
844 diff --git a/lib/expat/xmlparse/xmlrpc_xmlparse.pc.cmake b/lib/expat/xmlparse/xmlrpc_xmlparse.pc.cmake
845 new file mode 100644
846 index 0000000..5b2a7e4
847 --- /dev/null
848 +++ b/lib/expat/xmlparse/xmlrpc_xmlparse.pc.cmake
849 @@ -0,0 +1,12 @@
850 +bindir=@bindir@
851 +prefix=@prefix@
852 +libdir=@libdir@
853 +includedir=@includedir@
854 +
855 +Name: xmlrpc_xmlparse
856 +Description: XMLRPC xmlparse library
857 +Version: @XMLRPC_C_VERSION@
858 +
859 +Requires.private: xmlrpc_xmltok
860 +Libs: -L${libdir} -lxmlrpc_xmlparse
861 +Cflags:
862 diff --git a/lib/expat/xmltok/CMakeLists.txt b/lib/expat/xmltok/CMakeLists.txt
863 new file mode 100644
864 index 0000000..359c4e4
865 --- /dev/null
866 +++ b/lib/expat/xmltok/CMakeLists.txt
867 @@ -0,0 +1,22 @@
868 +# -*- cmake -*-
869 +
870 +include_directories(${CMAKE_CURRENT_BINARY_DIR})
871 +
872 +add_definitions(-DXML_BYTE_ORDER=0)
873 +
874 +add_library(xmlrpc_xmltok STATIC
875 + xmltok.c xmlrole.c ${CMAKE_CURRENT_BINARY_DIR}/nametab.h)
876 +
877 +set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/nametab.h
878 + PROPERTIES
879 + OBJECT_DEPENDS gennmtab
880 + GENERATED true)
881 +
882 +
883 +get_target_property(GENNMTAB_EXECUTABLE gennmtab LOCATION)
884 +add_custom_command(
885 + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/nametab.h
886 + COMMAND ${GENNMTAB_EXECUTABLE} >nametab.h || { rm -f nametab.h\; false\; }
887 + DEPENDS gennmtab)
888 +
889 +ensc_pkgconfig(xmlrpc_xmltok)
890 diff --git a/lib/expat/xmltok/xmlrpc_xmltok.pc.cmake b/lib/expat/xmltok/xmlrpc_xmltok.pc.cmake
891 new file mode 100644
892 index 0000000..88e7ad8
893 --- /dev/null
894 +++ b/lib/expat/xmltok/xmlrpc_xmltok.pc.cmake
895 @@ -0,0 +1,9 @@
896 +prefix=@prefix@
897 +libdir=@libdir@
898 +
899 +Name: xmlrpc_xmltok
900 +Description: XMLRPC xmltok library
901 +Version: @XMLRPC_C_VERSION@
902 +
903 +Libs: -L${libdir}
904 +Cflags:
905 diff --git a/lib/libutil/CMakeLists.txt b/lib/libutil/CMakeLists.txt
906 new file mode 100644
907 index 0000000..06136db
908 --- /dev/null
909 +++ b/lib/libutil/CMakeLists.txt
910 @@ -0,0 +1,25 @@
911 +# -*- cmake -*-
912 +
913 +add_library(xmlrpc_util SHARED
914 + asprintf.c
915 + base64.c
916 + error.c
917 + make_printable.c
918 + memblock.c
919 + select.c
920 + sleep.c
921 + time.c
922 + utf8.c)
923 +
924 +set_target_properties(xmlrpc_util
925 + PROPERTIES
926 + LINK_FLAGS ${XMLRPC_LINKER_FLAGS}
927 + VERSION ${XMLRPC_C_LIBVERSION}
928 + SOVERSION ${XMLRPC_C_SOVERSION})
929 +
930 +install(TARGETS xmlrpc_util
931 + RUNTIME DESTINATION ${_bin}
932 + LIBRARY DESTINATION ${_lib}
933 + ARCHIVE DESTINATION ${_lib})
934 +
935 +ensc_pkgconfig(xmlrpc_util)
936 diff --git a/lib/libutil/xmlrpc_util.pc.cmake b/lib/libutil/xmlrpc_util.pc.cmake
937 new file mode 100644
938 index 0000000..3d2968e
939 --- /dev/null
940 +++ b/lib/libutil/xmlrpc_util.pc.cmake
941 @@ -0,0 +1,10 @@
942 +prefix=@prefix@
943 +libdir=@libdir@
944 +includedir=@includedir@
945 +
946 +Name: xmlrpc_util
947 +Description: XMLRPC utility library
948 +Version: @XMLRPC_C_VERSION@
949 +
950 +Libs: -L${libdir} -lxmlrpc_util
951 +Cflags: -I${includedir}
952 diff --git a/lib/libwww_transport/CMakeLists.txt b/lib/libwww_transport/CMakeLists.txt
953 new file mode 100644
954 index 0000000..aa52d9e
955 --- /dev/null
956 +++ b/lib/libwww_transport/CMakeLists.txt
957 @@ -0,0 +1,7 @@
958 +# -*- cmake -*-
959 +
960 +if(MUST_BUILD_LIBWWW_CLIENT)
961 + list(APPEND transport_SOURCES
962 + ${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc_libwww_transport.c
963 + ${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc_libwww_transport.h)
964 +endif(MUST_BUILD_LIBWWW_CLIENT)
965 diff --git a/lib/util/CMakeLists.txt b/lib/util/CMakeLists.txt
966 new file mode 100644
967 index 0000000..80696d9
968 --- /dev/null
969 +++ b/lib/util/CMakeLists.txt
970 @@ -0,0 +1,17 @@
971 +## -*- cmake -*-
972 +
973 +set(util_SOURCES
974 + casprintf.c
975 + cmdline_parser.c
976 + cmdline_parser_cpp.cpp
977 + getoptx.c
978 + getoptx.h
979 + stripcaseeq.c
980 + string_parser.c
981 +)
982 +
983 +if(WIN32)
984 + list(APPEND util_SOURCES pthreadx_win32.c)
985 +endif(WIN32)
986 +
987 +add_library(util STATIC ${util_SOURCES})
988 diff --git a/lib/wininet_transport/CMakeLists.txt b/lib/wininet_transport/CMakeLists.txt
989 new file mode 100644
990 index 0000000..17535ab
991 --- /dev/null
992 +++ b/lib/wininet_transport/CMakeLists.txt
993 @@ -0,0 +1,7 @@
994 +# -*- cmake -*-
995 +
996 +if(MUST_BUILD_WININET_CLIENT)
997 + list(APPEND transport_SOURCES
998 + ${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc_wininet_transport.c
999 + ${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc_wininet_transport.h)
1000 +endif(MUST_BUILD_WININET_CLIENT)
1001 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
1002 new file mode 100644
1003 index 0000000..4c03b5b
1004 --- /dev/null
1005 +++ b/src/CMakeLists.txt
1006 @@ -0,0 +1,121 @@
1007 +# -*- cmake -*-
1008 +
1009 +if(ENABLE_LIBXML2_BACKEND)
1010 + set(xmlrpc_xml_parser xmlrpc_libxml2.c)
1011 + set(libxml_INCLUDES ${LIBXML2_CFLAGS})
1012 + set(libxml_LIBS ${LIBXML2_LDFLAGS})
1013 + set(xmlrpc_pkgconfig_req ${libxml_pkgconfig})
1014 +else(ENABLE_LIBXML2_BACKEND)
1015 + set(xmlrpc_xml_parser xmlrpc_expat.c)
1016 + set(libxml_INCLUDES -I${xmlrpc-c_SOURCE_DIR}/lib/expat/xmlparse)
1017 + set(libxml_LIBS xmlrpc_xmlparse)
1018 + set(xmlrpc_pkgconfig_req xmlrpc_xmlparse)
1019 +endif(ENABLE_LIBXML2_BACKEND)
1020 +
1021 +if(MUST_BUILD_WININET_CLIENT)
1022 + set(client_wininet_CFLAGS "")
1023 + set(client_wininet_LIBS "${WININET_LDADD}")
1024 + list(APPEND transport_SOURCES
1025 + ${wininet_srcdir}/xmlrpc_wininet_transport.c ${wininet_srcdir}/xmlrpc_wininet_transport.h)
1026 +endif(MUST_BUILD_WININET_CLIENT)
1027 +
1028 +if(MUST_BUILD_LIBWWW_CLIENT)
1029 + set(client_libwww_CFLAGS "${LIBWWW_CFLAGS}")
1030 + set(client_libwww_LIBS "${LIBWWW_LIBS}")
1031 + list(APPEND transport_SOURCES ${libwww_srcdir}/xmlrpc_libwww_transport.c ${libwww_srcdir}/xmlrpc_libwww_transport.h)
1032 +endif(MUST_BUILD_LIBWWW_CLIENT)
1033 +
1034 +if(MUST_BUILD_CURL_CLIENT)
1035 + set(client_curl_CFLAGS ${CURL_CFLAGS})
1036 + set(client_curl_LIBS ${CURL_LDFLAGS})
1037 + set(xmlrpc_client_pkgconfig_req libcurl)
1038 + list(APPEND transport_SOURCES
1039 + ${curl_srcdir}/xmlrpc_curl_transport.c
1040 + ${curl_srcdir}/curltransaction.c
1041 + ${curl_srcdir}/curltransaction.h
1042 + ${curl_srcdir}/curlmulti.c
1043 + ${curl_srcdir}/curlmulti.h
1044 + ${curl_srcdir}/lock.h
1045 + ${curl_srcdir}/lock_pthread.c
1046 + ${curl_srcdir}/lock_pthread.h
1047 + ${curl_srcdir}/curlversion.h
1048 + )
1049 +endif(MUST_BUILD_CURL_CLIENT)
1050 +
1051 +set(client_CFLAGS "-I${wininet_srcdir} -I${libwww_srcdir} -I${curl_srcdir} ${client_wininet_CFLAGS} ${client_libwww_CFLAGS} ${client_curl_CFLAGS}")
1052 +set(client_LIBS ${client_wininet_LIBS} ${client_libwww_LIBS} ${client_curl_LIBS})
1053 +
1054 +
1055 +add_subdirectory(cpp)
1056 +add_subdirectory(test)
1057 +
1058 +
1059 +
1060 +### libxmlrpc.so
1061 +add_library(xmlrpc SHARED
1062 + double.c parse_datetime.c parse_value.c resource.c trace.c version.c
1063 + ${xmlrpc_xml_parser}
1064 + xmlrpc_data.c xmlrpc_datetime.c xmlrpc_string.c
1065 + xmlrpc_array.c xmlrpc_struct.c
1066 + xmlrpc_build.c xmlrpc_decompose.c xmlrpc_parse.c xmlrpc_serialize.c
1067 + xmlrpc_base64.c xmlrpc_authcookie.c)
1068 +
1069 +set_target_properties(xmlrpc
1070 + PROPERTIES
1071 + COMPILE_FLAGS ${libxml_INCLUDES})
1072 +
1073 +ensc_pkgconfig(xmlrpc)
1074 +target_link_libraries(xmlrpc ${libxml_LIBS} xmlrpc_util)
1075 +list(APPEND lib_TARGETS xmlrpc)
1076 +
1077 +### libxmlrpc_client.so
1078 +add_library(xmlrpc_client SHARED
1079 + xmlrpc_client.c xmlrpc_client_global.c xmlrpc_server_info.c ${transport_SOURCES})
1080 +
1081 +target_link_libraries(xmlrpc_client xmlrpc ${client_LIBS})
1082 +set_target_properties(xmlrpc_client
1083 + PROPERTIES
1084 + COMPILE_FLAGS "${client_CFLAGS}")
1085 +list(APPEND lib_TARGETS xmlrpc_client)
1086 +ensc_pkgconfig(xmlrpc_client)
1087 +
1088 +### libxmlrpc_server.so
1089 +add_library(xmlrpc_server SHARED
1090 + registry.c method.c system_method.c)
1091 +target_link_libraries(xmlrpc_server xmlrpc)
1092 +list(APPEND lib_TARGETS xmlrpc_server)
1093 +ensc_pkgconfig(xmlrpc_server)
1094 +
1095 +
1096 +### libxmlrpc_server_abyss.so
1097 +if(ENABLE_ABYSS_SERVER)
1098 + add_library(xmlrpc_server_abyss SHARED
1099 + xmlrpc_server_abyss.c)
1100 + target_link_libraries(xmlrpc_server_abyss xmlrpc_abyss xmlrpc_server)
1101 + list(APPEND lib_TARGETS xmlrpc_server_abyss)
1102 + ensc_pkgconfig(xmlrpc_server_abyss)
1103 +endif(ENABLE_ABYSS_SERVER)
1104 +
1105 +
1106 +
1107 +### libxmlrpc_server_cgi.so
1108 +if(ENABLE_CGI_SERVER)
1109 + add_library(xmlrpc_server_cgi SHARED
1110 + xmlrpc_server_cgi)
1111 + target_link_libraries(xmlrpc_server_cgi xmlrpc_server)
1112 + list(APPEND lib_TARGETS xmlrpc_server_cgi)
1113 + ensc_pkgconfig(xmlrpc_server_cgi)
1114 +endif(ENABLE_CGI_SERVER)
1115 +
1116 +install(TARGETS ${lib_TARGETS}
1117 + RUNTIME DESTINATION ${_bin}
1118 + LIBRARY DESTINATION ${_lib})
1119 +
1120 +set_target_properties(${lib_TARGETS}
1121 + PROPERTIES
1122 + LINK_FLAGS ${XMLRPC_LINKER_FLAGS}
1123 + VERSION ${XMLRPC_C_LIBVERSION}
1124 + SOVERSION ${XMLRPC_C_SOVERSION})
1125 +
1126 +
1127 +enable_testing()
1128 diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
1129 new file mode 100644
1130 index 0000000..345c5ac
1131 --- /dev/null
1132 +++ b/src/cpp/CMakeLists.txt
1133 @@ -0,0 +1,70 @@
1134 +# -*- cmake -*-
1135 +
1136 +####### libxmlrpc++.so
1137 +add_library(xmlrpc++ SHARED
1138 + base64.cpp env_wrap.cpp fault.cpp girerr.cpp girmem.cpp
1139 + outcome.cpp param_list.cpp value.cpp xml.cpp)
1140 +target_link_libraries(xmlrpc++ xmlrpc)
1141 +list(APPEND lib_TARGETS xmlrpc++)
1142 +ensc_pkgconfig(xmlrpc++)
1143 +
1144 +####### libxmlrpc_cpp.so
1145 +add_library(xmlrpc_cpp SHARED XmlRpcCpp)
1146 +target_link_libraries(xmlrpc_cpp xmlrpc xmlrpc_server xmlrpc_client)
1147 +list(APPEND lib_TARGETS xmlrpc_cpp)
1148 +ensc_pkgconfig(xmlrpc_cpp)
1149 +
1150 +####### libxmlrpc_server++.so
1151 +add_library(xmlrpc_server++ SHARED registry.cpp)
1152 +target_link_libraries(xmlrpc_server++ xmlrpc++ xmlrpc_server)
1153 +list(APPEND lib_TARGETS xmlrpc_server++)
1154 +ensc_pkgconfig(xmlrpc_server++)
1155 +
1156 +####### libxmlrpc_server_abyss++.so
1157 +if(ENABLE_ABYSS_SERVER)
1158 + add_library(xmlrpc_server_abyss++ SHARED server_abyss.cpp)
1159 + target_link_libraries(xmlrpc_server_abyss++ xmlrpc_server++ xmlrpc_server_abyss)
1160 + list(APPEND lib_TARGETS xmlrpc_server_abyss++)
1161 + ensc_pkgconfig(xmlrpc_server_abyss++)
1162 +endif(ENABLE_ABYSS_SERVER)
1163 +
1164 +####### libxmlrpc_server_cgi++.so
1165 +if(ENABLE_CGI_SERVER)
1166 + add_library(xmlrpc_server_cgi++ SHARED server_cgi.cpp)
1167 + target_link_libraries(xmlrpc_server_cgi++ xmlrpc_server++)
1168 + list(APPEND lib_TARGETS xmlrpc_server_cgi++)
1169 + ensc_pkgconfig(xmlrpc_server_cgi++)
1170 +endif(ENABLE_CGI_SERVER)
1171 +
1172 +####### libxmlrpc_server_pstream++.so
1173 +add_library(xmlrpc_server_pstream++ SHARED server_pstream.cpp server_pstream_conn)
1174 +target_link_libraries(xmlrpc_server_pstream++ xmlrpc_server++ xmlrpc_packetsocket)
1175 +list(APPEND lib_TARGETS xmlrpc_server_pstream++)
1176 +ensc_pkgconfig(xmlrpc_server_pstream++)
1177 +
1178 +####### libxmlrpc_packetsocket.so
1179 +add_library(xmlrpc_packetsocket SHARED packetsocket.cpp)
1180 +target_link_libraries(xmlrpc_packetsocket xmlrpc++)
1181 +list(APPEND lib_TARGETS xmlrpc_packetsocket)
1182 +ensc_pkgconfig(xmlrpc_packetsocket)
1183 +
1184 +####### libxmlrpc_client++.so
1185 +add_library(xmlrpc_client++ SHARED
1186 + client.cpp client_simple.cpp curl.cpp libwww.cpp wininet.cpp pstream.cpp)
1187 +set_target_properties(xmlrpc_client++
1188 + PROPERTIES
1189 + COMPILE_FLAGS "-I${wininet_srcdir} -I${libwww_srcdir} -I${curl_srcdir}")
1190 +target_link_libraries(xmlrpc_client++ xmlrpc++ xmlrpc_client xmlrpc_packetsocket)
1191 +list(APPEND lib_TARGETS xmlrpc_client++)
1192 +ensc_pkgconfig(xmlrpc_client++)
1193 +
1194 +
1195 +install(TARGETS ${lib_TARGETS}
1196 + RUNTIME DESTINATION ${_bin}
1197 + LIBRARY DESTINATION ${_lib})
1198 +
1199 +set_target_properties(${lib_TARGETS}
1200 + PROPERTIES
1201 + LINK_FLAGS ${XMLRPC_LINKER_FLAGS}
1202 + VERSION ${XMLRPC_CXX_LIBVERSION}
1203 + SOVERSION ${XMLRPC_CXX_SOVERSION})
1204 diff --git a/src/cpp/test/CMakeLists.txt b/src/cpp/test/CMakeLists.txt
1205 new file mode 100644
1206 index 0000000..5b046b4
1207 --- /dev/null
1208 +++ b/src/cpp/test/CMakeLists.txt
1209 @@ -0,0 +1,17 @@
1210 +# -*- cmake -*-
1211 +
1212 +set(test_SOURCES
1213 + test.cpp registry.cpp server_abyss.cpp server_pstream.cpp tools.cpp)
1214 +
1215 +if(MUST_BUILD_CLIENT)
1216 + list(APPEND test_SOURCES testclient.cpp)
1217 + list(APPEND test_LIBS xmlrpc_client++)
1218 +else(MUST_BUILD_CLIENT)
1219 + list(APPEND test_SOURCES testclient_dummy.c)
1220 +endif(MUST_BUILD_CLIENT)
1221 +
1222 +add_executable(src-test ${test_SOURCES})
1223 +target_link_libraries(src-test xmlrpc_server_abyss++ util ${test_LIBS})
1224 +
1225 +enable_testing()
1226 +add_test(runtests src-test)
1227 diff --git a/src/cpp/xmlrpc++.pc.cmake b/src/cpp/xmlrpc++.pc.cmake
1228 new file mode 100644
1229 index 0000000..3bfa992
1230 --- /dev/null
1231 +++ b/src/cpp/xmlrpc++.pc.cmake
1232 @@ -0,0 +1,12 @@
1233 +bindir=@bindir@
1234 +prefix=@prefix@
1235 +libdir=@libdir@
1236 +includedir=@includedir@
1237 +
1238 +Name: xmlrpc++
1239 +Description: XMLRPC C++ Base library
1240 +Version: @XMLRPC_C_VERSION@
1241 +
1242 +Requires.private: xmlrpc xmlrpc_util
1243 +Libs: -L${libdir} -lxmlrpc++
1244 +Cflags: -I${includedir}
1245 diff --git a/src/cpp/xmlrpc_client++.pc.cmake b/src/cpp/xmlrpc_client++.pc.cmake
1246 new file mode 100644
1247 index 0000000..bd6766b
1248 --- /dev/null
1249 +++ b/src/cpp/xmlrpc_client++.pc.cmake
1250 @@ -0,0 +1,12 @@
1251 +bindir=@bindir@
1252 +prefix=@prefix@
1253 +libdir=@libdir@
1254 +includedir=@includedir@
1255 +
1256 +Name: xmlrpc_client++
1257 +Description: XMLRPC C++ Client library
1258 +Version: @XMLRPC_C_VERSION@
1259 +
1260 +Requires.private: xmlrpc++ xmlrpc_client xmlrpc_packetsocket xmlrpc xmlrpc_util
1261 +Libs: -L${libdir} -lxmlrpc_client++
1262 +Cflags: -I${includedir}
1263 diff --git a/src/cpp/xmlrpc_cpp.pc.cmake b/src/cpp/xmlrpc_cpp.pc.cmake
1264 new file mode 100644
1265 index 0000000..8acc22f
1266 --- /dev/null
1267 +++ b/src/cpp/xmlrpc_cpp.pc.cmake
1268 @@ -0,0 +1,12 @@
1269 +bindir=@bindir@
1270 +prefix=@prefix@
1271 +libdir=@libdir@
1272 +includedir=@includedir@
1273 +
1274 +Name: xmlrpc_cpp
1275 +Description: XMLRPC CPP library
1276 +Version: @XMLRPC_C_VERSION@
1277 +
1278 +Requires.private: xmlrpc xmlrpc_server xmlrpc_util
1279 +Libs: -L${libdir} -lxmlrpc_cpp
1280 +Cflags: -I${includedir}
1281 diff --git a/src/cpp/xmlrpc_packetsocket.pc.cmake b/src/cpp/xmlrpc_packetsocket.pc.cmake
1282 new file mode 100644
1283 index 0000000..4a8aedc
1284 --- /dev/null
1285 +++ b/src/cpp/xmlrpc_packetsocket.pc.cmake
1286 @@ -0,0 +1,12 @@
1287 +bindir=@bindir@
1288 +prefix=@prefix@
1289 +libdir=@libdir@
1290 +includedir=@includedir@
1291 +
1292 +Name: xmlrpc_packetsocket
1293 +Description: XMLRPC C++ packsetsocket library
1294 +Version: @XMLRPC_C_VERSION@
1295 +
1296 +Requires.private: xmlrpc++
1297 +Libs: -L${libdir} -lxmlrpc_packetsocket
1298 +Cflags: -I${includedir}
1299 diff --git a/src/cpp/xmlrpc_server++.pc.cmake b/src/cpp/xmlrpc_server++.pc.cmake
1300 new file mode 100644
1301 index 0000000..c769d54
1302 --- /dev/null
1303 +++ b/src/cpp/xmlrpc_server++.pc.cmake
1304 @@ -0,0 +1,12 @@
1305 +bindir=@bindir@
1306 +prefix=@prefix@
1307 +libdir=@libdir@
1308 +includedir=@includedir@
1309 +
1310 +Name: xmlrpc_server++
1311 +Description: XMLRPC C++ Server library
1312 +Version: @XMLRPC_C_VERSION@
1313 +
1314 +Requires.private: xmlrpc++ xmlrpc_server xmlrpc xmlrpc_util
1315 +Libs: -L${libdir} -lxmlrpc_server++
1316 +Cflags: -I${includedir}
1317 diff --git a/src/cpp/xmlrpc_server_abyss++.pc.cmake b/src/cpp/xmlrpc_server_abyss++.pc.cmake
1318 new file mode 100644
1319 index 0000000..b325eff
1320 --- /dev/null
1321 +++ b/src/cpp/xmlrpc_server_abyss++.pc.cmake
1322 @@ -0,0 +1,12 @@
1323 +bindir=@bindir@
1324 +prefix=@prefix@
1325 +libdir=@libdir@
1326 +includedir=@includedir@
1327 +
1328 +Name: xmlrpc_server_abyss++
1329 +Description: XMLRPC C++ Abyss-Server library
1330 +Version: @XMLRPC_C_VERSION@
1331 +
1332 +Requires.private: xmlrpc_server++ xmlrpc_server_abyss xmlrpc++ xmlrpc_abyss xmlrpc_util
1333 +Libs: -L${libdir} -lxmlrpc_server_abyss++
1334 +Cflags: -I${includedir}
1335 diff --git a/src/cpp/xmlrpc_server_cgi++.pc.cmake b/src/cpp/xmlrpc_server_cgi++.pc.cmake
1336 new file mode 100644
1337 index 0000000..72a3726
1338 --- /dev/null
1339 +++ b/src/cpp/xmlrpc_server_cgi++.pc.cmake
1340 @@ -0,0 +1,12 @@
1341 +bindir=@bindir@
1342 +prefix=@prefix@
1343 +libdir=@libdir@
1344 +includedir=@includedir@
1345 +
1346 +Name: xmlrpc_server_cgi++
1347 +Description: XMLRPC C++ CGI-Server library
1348 +Version: @XMLRPC_C_VERSION@
1349 +
1350 +Requires.private: xmlrpc_server++ xmlrpc++ xmlrpc
1351 +Libs: -L${libdir} -lxmlrpc_server_cgi++
1352 +Cflags: -I${includedir}
1353 diff --git a/src/cpp/xmlrpc_server_pstream++.pc.cmake b/src/cpp/xmlrpc_server_pstream++.pc.cmake
1354 new file mode 100644
1355 index 0000000..da5639d
1356 --- /dev/null
1357 +++ b/src/cpp/xmlrpc_server_pstream++.pc.cmake
1358 @@ -0,0 +1,12 @@
1359 +bindir=@bindir@
1360 +prefix=@prefix@
1361 +libdir=@libdir@
1362 +includedir=@includedir@
1363 +
1364 +Name: xmlrpc_server_pstream++
1365 +Description: XMLRPC C++ pstream-Server library
1366 +Version: @XMLRPC_C_VERSION@
1367 +
1368 +Requires.private: xmlrpc_server++ xmlrpc_packetsocket xmlrpc++
1369 +Libs: -L${libdir} -lxmlrpc_server_pstream++
1370 +Cflags: -I${includedir}
1371 diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
1372 new file mode 100644
1373 index 0000000..0859ccc
1374 --- /dev/null
1375 +++ b/src/test/CMakeLists.txt
1376 @@ -0,0 +1,37 @@
1377 +# -*- cmake -*-
1378 +
1379 +set(test_SOURCES
1380 + abyss.c
1381 + abyss.h
1382 + test.c
1383 + cgi.c
1384 + method_registry.c
1385 + parse_xml.c
1386 + serialize.c
1387 + serialize_value.c
1388 + server_abyss.c
1389 + value.c
1390 + value_datetime.c
1391 + xml_data.c)
1392 +
1393 +if(MUST_BUILD_CLIENT)
1394 + list(APPEND test_SOURCES client.c)
1395 + list(APPEND test_LIBS xmlrpc_client)
1396 +else(MUST_BUILD_CLIENT)
1397 + list(APPEND test_SOURCES client_dummy.c)
1398 +endif(MUST_BUILD_CLIENT)
1399 +
1400 +
1401 +add_executable(src-test ${test_SOURCES})
1402 +target_link_libraries(src-test xmlrpc_server_abyss util ${test_LIBS})
1403 +
1404 +add_executable(cgitest1 cgitest1.c)
1405 +target_link_libraries(cgitest1 xmlrpc_server_cgi)
1406 +
1407 +add_custom_command(TARGET src-test
1408 + POST_BUILD
1409 + COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/data
1410 + COMMAND ln -s ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR})
1411 +
1412 +enable_testing()
1413 +add_test(runtests src-test)
1414 diff --git a/src/xmlrpc.pc.cmake b/src/xmlrpc.pc.cmake
1415 new file mode 100644
1416 index 0000000..4c92f93
1417 --- /dev/null
1418 +++ b/src/xmlrpc.pc.cmake
1419 @@ -0,0 +1,12 @@
1420 +bindir=@bindir@
1421 +prefix=@prefix@
1422 +libdir=@libdir@
1423 +includedir=@includedir@
1424 +
1425 +Name: xmlrpc
1426 +Description: XMLRPC base library
1427 +Version: @XMLRPC_C_VERSION@
1428 +
1429 +Requires.private: @xmlrpc_pkgconfig_req@ xmlrpc_util
1430 +Libs: -L${libdir} -lxmlrpc @xmlrpc_pkgconfig_libs@
1431 +Cflags: -I${includedir}
1432 diff --git a/src/xmlrpc_client.pc.cmake b/src/xmlrpc_client.pc.cmake
1433 new file mode 100644
1434 index 0000000..7f28a15
1435 --- /dev/null
1436 +++ b/src/xmlrpc_client.pc.cmake
1437 @@ -0,0 +1,12 @@
1438 +bindir=@bindir@
1439 +prefix=@prefix@
1440 +libdir=@libdir@
1441 +includedir=@includedir@
1442 +
1443 +Name: xmlrpc_client
1444 +Description: XMLRPC client library
1445 +Version: @XMLRPC_C_VERSION@
1446 +
1447 +Requires.private: xmlrpc @xmlrpc_client_pkgconfig_req@ xmlrpc_util
1448 +Libs: -L${libdir} -lxmlrpc_client @client_libwww_LIBS@ @client_wininet_LIBS@
1449 +Cflags: -I${includedir}
1450 diff --git a/src/xmlrpc_server.pc.cmake b/src/xmlrpc_server.pc.cmake
1451 new file mode 100644
1452 index 0000000..d5c334e
1453 --- /dev/null
1454 +++ b/src/xmlrpc_server.pc.cmake
1455 @@ -0,0 +1,12 @@
1456 +bindir=@bindir@
1457 +prefix=@prefix@
1458 +libdir=@libdir@
1459 +includedir=@includedir@
1460 +
1461 +Name: xmlrpc_server
1462 +Description: XMLRPC Server library
1463 +Version: @XMLRPC_C_VERSION@
1464 +
1465 +Requires.private: xmlrpc xmlrpc_util
1466 +Libs: -L${libdir} -lxmlrpc_server
1467 +Cflags: -I${includedir}
1468 diff --git a/src/xmlrpc_server_abyss.pc.cmake b/src/xmlrpc_server_abyss.pc.cmake
1469 new file mode 100644
1470 index 0000000..48fa0b1
1471 --- /dev/null
1472 +++ b/src/xmlrpc_server_abyss.pc.cmake
1473 @@ -0,0 +1,12 @@
1474 +bindir=@bindir@
1475 +prefix=@prefix@
1476 +libdir=@libdir@
1477 +includedir=@includedir@
1478 +
1479 +Name: xmlrpc_server_abyss
1480 +Description: XMLRPC Server Abyss library
1481 +Version: @XMLRPC_C_VERSION@
1482 +
1483 +Requires.private: xmlrpc_server xmlrpc_abyss xmlrpc xmlrpc_util
1484 +Libs: -L${libdir} -lxmlrpc_server_abyss
1485 +Cflags: -I${includedir}
1486 diff --git a/src/xmlrpc_server_cgi.pc.cmake b/src/xmlrpc_server_cgi.pc.cmake
1487 new file mode 100644
1488 index 0000000..4d174ef
1489 --- /dev/null
1490 +++ b/src/xmlrpc_server_cgi.pc.cmake
1491 @@ -0,0 +1,12 @@
1492 +bindir=@bindir@
1493 +prefix=@prefix@
1494 +libdir=@libdir@
1495 +includedir=@includedir@
1496 +
1497 +Name: xmlrpc_server_cgi
1498 +Description: XMLRPC CGI-Server library
1499 +Version: @XMLRPC_C_VERSION@
1500 +
1501 +Requires.private: xmlrpc_server xmlrpc xmlrpc_util
1502 +Libs: -L${libdir} -lxmlrpc_server_cgi
1503 +Cflags: -I${includedir}
1504 diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
1505 new file mode 100644
1506 index 0000000..0bc45a9
1507 --- /dev/null
1508 +++ b/tools/CMakeLists.txt
1509 @@ -0,0 +1,21 @@
1510 +# -*- cmake -*-
1511 +
1512 +add_subdirectory(lib)
1513 +add_subdirectory(binmode-rpc-kit)
1514 +add_subdirectory(turbocharger)
1515 +
1516 +if (MUST_BUILD_CLIENT)
1517 + add_subdirectory(xmlrpc)
1518 + add_subdirectory(xmlrpc_transport)
1519 +
1520 +
1521 + if (ENABLE_CPLUSPLUS)
1522 + add_subdirectory(xml-rpc-api2cpp)
1523 + add_subdirectory(xml-rpc-api2txt)
1524 + add_subdirectory(xmlrpc_cpp_proxy)
1525 +
1526 + if (BUILD_XMLRPC_PSTREAM AND ENABLE_CGI_SERVER)
1527 + add_subdirectory(xmlrpc_pstream)
1528 + endif()
1529 + endif()
1530 +endif()
1531 diff --git a/tools/binmode-rpc-kit/CMakeLists.txt b/tools/binmode-rpc-kit/CMakeLists.txt
1532 new file mode 100644
1533 index 0000000..a707c75
1534 --- /dev/null
1535 +++ b/tools/binmode-rpc-kit/CMakeLists.txt
1536 @@ -0,0 +1,2 @@
1537 +# -*- cmake -*-
1538 +
1539 diff --git a/tools/lib/CMakefiles.txt b/tools/lib/CMakefiles.txt
1540 new file mode 100644
1541 index 0000000..342423d
1542 --- /dev/null
1543 +++ b/tools/lib/CMakefiles.txt
1544 @@ -0,0 +1 @@
1545 +# -*- cmake -*-
1546 diff --git a/tools/turbocharger/CMakeLists.txt b/tools/turbocharger/CMakeLists.txt
1547 new file mode 100644
1548 index 0000000..342423d
1549 --- /dev/null
1550 +++ b/tools/turbocharger/CMakeLists.txt
1551 @@ -0,0 +1 @@
1552 +# -*- cmake -*-
1553 diff --git a/tools/xml-rpc-api2cpp/CMakeLists.txt b/tools/xml-rpc-api2cpp/CMakeLists.txt
1554 new file mode 100644
1555 index 0000000..1e9134a
1556 --- /dev/null
1557 +++ b/tools/xml-rpc-api2cpp/CMakeLists.txt
1558 @@ -0,0 +1,15 @@
1559 +# -*- cmake -*-
1560 +
1561 +add_executable(xml-rpc-api2cpp
1562 + xml-rpc-api2cpp.cpp
1563 + DataType.cpp
1564 + XmlRpcFunction.cpp
1565 + XmlRpcClass.cpp
1566 + SystemProxy.cpp)
1567 +target_link_libraries(xml-rpc-api2cpp xmlrpc_cpp xmlrpc_client)
1568 +
1569 +install(TARGETS xml-rpc-api2cpp
1570 + RUNTIME DESTINATION bin)
1571 +
1572 +install(FILES xml-rpc-api2cpp.1
1573 + DESTINATION ${mandir}/man1)
1574 diff --git a/tools/xml-rpc-api2txt/CMakeLists.txt b/tools/xml-rpc-api2txt/CMakeLists.txt
1575 new file mode 100644
1576 index 0000000..5b01824
1577 --- /dev/null
1578 +++ b/tools/xml-rpc-api2txt/CMakeLists.txt
1579 @@ -0,0 +1,7 @@
1580 +# -*- cmake -*-
1581 +
1582 +install(PROGRAMS xml-rpc-api2txt
1583 + DESTINATION ${bindir})
1584 +
1585 +install(FILES xml-rpc-api2txt.1
1586 + DESTINATION ${mandir}/man1)
1587 diff --git a/tools/xmlrpc/CMakeLists.txt b/tools/xmlrpc/CMakeLists.txt
1588 new file mode 100644
1589 index 0000000..da01ec3
1590 --- /dev/null
1591 +++ b/tools/xmlrpc/CMakeLists.txt
1592 @@ -0,0 +1,17 @@
1593 +# -*- cmake -*-
1594 +
1595 +#set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ../lib/include)
1596 +
1597 +include_directories(../lib/include)
1598 +add_executable(tool-xmlrpc
1599 + xmlrpc.c
1600 + ../lib/dumpvalue.c)
1601 +target_link_libraries(tool-xmlrpc xmlrpc_client util)
1602 +
1603 +set_target_properties(tool-xmlrpc
1604 + PROPERTIES OUTPUT_NAME xmlrpc)
1605 +
1606 +install(TARGETS tool-xmlrpc
1607 + DESTINATION ${_bin})
1608 +
1609 +ensc_set_link_exe_flags(tool-xmlrpc)
1610 diff --git a/tools/xmlrpc/config.h b/tools/xmlrpc/config.h
1611 new file mode 100644
1612 index 0000000..7409aed
1613 --- /dev/null
1614 +++ b/tools/xmlrpc/config.h
1615 @@ -0,0 +1 @@
1616 +#include <xmlrpc_config.h>
1617 diff --git a/tools/xmlrpc_cpp_proxy/CMakeLists.txt b/tools/xmlrpc_cpp_proxy/CMakeLists.txt
1618 new file mode 100644
1619 index 0000000..4166023
1620 --- /dev/null
1621 +++ b/tools/xmlrpc_cpp_proxy/CMakeLists.txt
1622 @@ -0,0 +1,17 @@
1623 +# -*- cmake -*-
1624 +
1625 +add_executable(xmlrpc_cpp_proxy
1626 + proxyClass.cpp
1627 + proxyClass.hpp
1628 + systemProxy.cpp
1629 + systemProxy.hpp
1630 + xmlrpcMethod.cpp
1631 + xmlrpcMethod.hpp
1632 + xmlrpcType.cpp
1633 + xmlrpcType.hpp
1634 + xmlrpc_cpp_proxy.cpp
1635 +)
1636 +target_link_libraries(xmlrpc_cpp_proxy xmlrpc_client++)
1637 +
1638 +install(TARGETS xmlrpc_cpp_proxy
1639 + RUNTIME DESTINATION bin)
1640 diff --git a/tools/xmlrpc_pstream/CMakeLists.txt b/tools/xmlrpc_pstream/CMakeLists.txt
1641 new file mode 100644
1642 index 0000000..b277bc8
1643 --- /dev/null
1644 +++ b/tools/xmlrpc_pstream/CMakeLists.txt
1645 @@ -0,0 +1,16 @@
1646 +# -*- cmake -*-
1647 +
1648 +add_executable(xmlrpc_pstream
1649 + xmlrpc_pstream.cpp
1650 + ../lib/dumpvalue.c)
1651 +
1652 +target_link_libraries(xmlrpc_pstream
1653 + ${READLINE}
1654 + ${NCURSES_LIBRARIES}
1655 + xmlrpc_client++
1656 + util)
1657 +
1658 +include_directories(../lib/include)
1659 +
1660 +install(TARGETS xmlrpc_pstream
1661 + RUNTIME DESTINATION bin)
1662 diff --git a/tools/xmlrpc_transport/CMakeLists.txt b/tools/xmlrpc_transport/CMakeLists.txt
1663 new file mode 100644
1664 index 0000000..b73d7c0
1665 --- /dev/null
1666 +++ b/tools/xmlrpc_transport/CMakeLists.txt
1667 @@ -0,0 +1,9 @@
1668 +# -*- cmake -*-
1669 +
1670 +add_executable(xmlrpc_transport xmlrpc_transport.c)
1671 +target_link_libraries(xmlrpc_transport xmlrpc_client util)
1672 +
1673 +install(TARGETS xmlrpc_transport
1674 + DESTINATION ${_bin})
1675 +
1676 +ensc_set_link_exe_flags(xmlrpc_transport)
1677 diff --git a/tools/xmlrpc_transport/config.h b/tools/xmlrpc_transport/config.h
1678 new file mode 100644
1679 index 0000000..7409aed
1680 --- /dev/null
1681 +++ b/tools/xmlrpc_transport/config.h
1682 @@ -0,0 +1 @@
1683 +#include <xmlrpc_config.h>
1684 diff --git a/transport_config.h.cmake b/transport_config.h.cmake
1685 new file mode 100644
1686 index 0000000..1ec3cf6
1687 --- /dev/null
1688 +++ b/transport_config.h.cmake
1689 @@ -0,0 +1,16 @@
1690 +/* -*- c -*- */
1691 +#define MUST_BUILD_WININET_CLIENT @_MUST_BUILD_WININET_CLIENT@
1692 +#define MUST_BUILD_LIBWWW_CLIENT @_MUST_BUILD_LIBWWW_CLIENT@
1693 +#define MUST_BUILD_CURL_CLIENT @_MUST_BUILD_CURL_CLIENT@
1694 +
1695 +static char const * const XMLRPC_DEFAULT_TRANSPORT =
1696 +#if MUST_BUILD_LIBWWW_CLIENT
1697 + "libwww"
1698 +#elif MUST_BUILD_CURL_CLIENT
1699 + "curl"
1700 +#elif MUST_BUILD_WININET_CLIENT
1701 + "wininet"
1702 +#else
1703 +# error "no client XML transport configured"
1704 +#endif
1705 + ;
1706 diff --git a/version.h.cmake b/version.h.cmake
1707 new file mode 100644
1708 index 0000000..0c964a3
1709 --- /dev/null
1710 +++ b/version.h.cmake
1711 @@ -0,0 +1,5 @@
1712 +/* This file was generated by a make rule */
1713 +#define XMLRPC_C_VERSION "@XMLRPC_C_VERSION@"
1714 +#define XMLRPC_VERSION_MAJOR @XMLRPC_C_VERSION_MAJOR_NUM@
1715 +#define XMLRPC_VERSION_MINOR @XMLRPC_C_VERSION_MINOR_NUM@
1716 +#define XMLRPC_VERSION_POINT @XMLRPC_C_VERSION_POINT_NUM@
1717 diff --git a/xmlrpc-c-config b/xmlrpc-c-config
1718 new file mode 100755
1719 index 0000000..327fad7
1720 --- /dev/null
1721 +++ b/xmlrpc-c-config
1722 @@ -0,0 +1,108 @@
1723 +#! /bin/sh
1724 +
1725 +comp=
1726 +
1727 +need_cxx=
1728 +need_client=
1729 +need_server=
1730 +need_abyss=
1731 +need_pstream=
1732 +need_packetsocket=
1733 +need_cgi=
1734 +
1735 +show_help() {
1736 + cat <<EOF
1737 +Usage: xmlrpc-c-config <feature> ... <option> ...
1738 +
1739 +The features are:
1740 + c++ legacy C++ wrapper API
1741 + c++2 modern C++ API
1742 + client client functions
1743 + cgi-server CGI-based server functions
1744 + abyss-server ABYSS-based server functions
1745 + pstream-server pstream-based server functions
1746 + server-util basic server functions (implied by *-server)
1747 +
1748 +Options are:
1749 + --version The version number of the package
1750 + --features List all features (aka modules) currently installed
1751 + --cflags C compiler flags to use when '#include'ing package headers
1752 + --libs Libraries and flags to use when linking programs normally
1753 + --ldadd Libraries to use with automake
1754 + --ldflags Flags to use with automake & libtool
1755 + --prefix The prefix under which the package was installed
1756 +EOF
1757 + exit $1
1758 +}
1759 +
1760 +test $# -ne 0 || show_help 1 >&2
1761 +
1762 +while test $# -gt 0; do
1763 + case $1 in
1764 + (c++) comp="$comp xmlrpc_cpp";;
1765 + (server-util) need_server=1;;
1766 + (cgi-server) need_cgi=1;;
1767 + (c++2) need_cxx=1;;
1768 + (abyss-server) need_abyss=1;;
1769 + (pstream-server) need_pstream=1;;
1770 + (packetsocket) need_packetsocket=1;;
1771 + (client|libwww-client) need_client=1;;
1772 + (--help) show_help 0;;
1773 + (--) shift; break;;
1774 + (--*) break;;
1775 + (*)
1776 + echo "Unrecognized token '$1'"
1777 + exit 1
1778 + ;;
1779 + esac
1780 + shift
1781 +done
1782 +
1783 +if test -z "$need_cxx"; then
1784 + test -z "$need_client" || comp="$comp xmlrpc_client"
1785 + test -z "$need_abyss" || comp="$comp xmlrpc_server_abyss"
1786 + test -z "$need_server" || comp="$comp xmlrpc_server"
1787 + test -z "$need_cgi" || comp="$comp xmlrpc_server_cgi"
1788 +else
1789 + test -z "$need_client" || comp="$comp xmlrpc_client++"
1790 + test -z "$need_abyss" || comp="$comp xmlrpc_server_abyss++"
1791 + test -z "$need_server" || comp="$comp xmlrpc_server++"
1792 + test -z "$need_cgi" || comp="$comp xmlrpc_server_cgi++"
1793 +fi
1794 +
1795 +test -z "$need_pstream" || comp="$comp xmlrpc_server_pstream++"
1796 +test -z "$need_packetsocket" || comp="$comp xmlrpc_packetsocket"
1797 +
1798 +dummy_comp=xmlrpc_client
1799 +
1800 +case $1 in
1801 + (--features|--modules)
1802 + echo "c++ abyss-server curl-client"
1803 + exit 0
1804 + ;;
1805 + (--version)
1806 + set -- --modversion
1807 + ;;
1808 + (--exec-prefix)
1809 + set -- --variable=prefix
1810 + ;;
1811 + (--*dir|--prefix)
1812 + set -- --variable=${1##--}
1813 + ;;
1814 + (--ldflags)
1815 + set -- --libs-only-L
1816 + ;;
1817 + (--ldadd)
1818 + set -- --libs-only-l
1819 + ;;
1820 + (--cflags)
1821 + set -- "$1"
1822 + ;;
1823 + (*)
1824 + dummy_comp=
1825 + ;;
1826 +esac
1827 +
1828 +test x"$comp" != x || comp=$dummy_comp
1829 +
1830 +exec pkg-config "$@" $comp
1831 diff --git a/xmlrpc_config.h.cmake b/xmlrpc_config.h.cmake
1832 new file mode 100644
1833 index 0000000..e4454e8
1834 --- /dev/null
1835 +++ b/xmlrpc_config.h.cmake
1836 @@ -0,0 +1,105 @@
1837 +/* -*- c -*- */
1838 +
1839 +#ifndef H_XMLRPC_C_CONFIG_H
1840 +
1841 +#define HAVE_SYS_IOCTL_H 0@HAVE_SYS_IOCTL_H@
1842 +
1843 +#define VA_LIST_IS_ARRAY @VA_LIST_IS_ARRAY@
1844 +#define XMLRPC_HAVE_WCHAR @XMLRPC_HAVE_WCHAR@
1845 +#define ATTR_UNUSED @ATTR_UNUSED@
1846 +#define DIRECTORY_SEPARATOR "@DIRECTORY_SEPARATOR@"
1847 +
1848 +#cmakedefine HAVE_WCHAR_H 1
1849 +#cmakedefine HAVE_SETENV 1
1850 +#cmakedefine HAVE_STRCASECMP 1
1851 +#cmakedefine HAVE__STRICMP 1
1852 +#cmakedefine HAVE_STRICMP 1
1853 +#cmakedefine HAVE_GETTIMEOFDAY 1
1854 +#cmakedefine HAVE_SETGROUPS 1
1855 +#cmakedefine HAVE_ASPRINTF 1
1856 +#cmakedefine HAVE_PSELECT 1
1857 +#cmakedefine HAVE_WCSNCMP 1
1858 +#cmakedefine HAVE_LOCALTIME_R 1
1859 +#cmakedefine HAVE_GMTIME_R 1
1860 +
1861 +#define HAVE_UNICODE_WCHAR HAVE_WCHAR_H
1862 +
1863 +/* Xmlrpc-c code uses __inline__ to declare functions that should
1864 + be compiled as inline code. GNU C recognizes the __inline__ keyword.
1865 + Others recognize 'inline' or '__inline' or nothing at all to say
1866 + a function should be inlined.
1867 +
1868 + We could make 'configure' simply do a trial compile to figure out
1869 + which one, but for now, this approximation is easier:
1870 +*/
1871 +#if (!defined(__GNUC__))
1872 + #if (!defined(__inline__))
1873 + #if (defined(__sgi) || defined(_AIX) || defined(_MSC_VER))
1874 + #define __inline__ __inline
1875 + #else
1876 + #define __inline__
1877 + #endif
1878 + #endif
1879 +#endif
1880 +
1881 +/* MSVCRT means we're using the Microsoft Visual C++ runtime library */
1882 +
1883 +#ifdef _MSC_VER
1884 +/* The compiler is Microsoft Visual C++. */
1885 + #define MSVCRT _MSC_VER
1886 +#else
1887 + #define MSVCRT 0
1888 +#endif
1889 +
1890 +#if MSVCRT
1891 + /* The MSVC runtime library _does_ have a 'struct timeval', but it is
1892 + part of the Winsock interface (along with select(), which is probably
1893 + its intended use), so isn't intended for use for general timekeeping.
1894 + */
1895 + #define HAVE_TIMEVAL 0
1896 + #define HAVE_TIMESPEC 0
1897 +#else
1898 + #define HAVE_TIMEVAL 1
1899 + /* timespec is Posix.1b. If we need to work on a non-Posix.1b non-Windows
1900 + system, we'll have to figure out how to make Configure determine this.
1901 + */
1902 + #define HAVE_TIMESPEC 1
1903 +#endif
1904 +
1905 +#if MSVCRT
1906 + #define XMLRPC_VSNPRINTF _vsnprintf
1907 +#else
1908 + #define XMLRPC_VSNPRINTF vsnprintf
1909 +#endif
1910 +
1911 +#if MSVCRT
1912 + #define HAVE_REGEX 0
1913 +#else
1914 + #define HAVE_REGEX 1
1915 +#endif
1916 +
1917 +#if MSVCRT
1918 + #define XMLRPC_SOCKETPAIR xmlrpc_win32_socketpair
1919 +#else
1920 + #define XMLRPC_SOCKETPAIR socketpair
1921 +#endif
1922 +
1923 +#if defined(_MSC_VER)
1924 +/* Starting with MSVC 8, the runtime library defines various POSIX functions
1925 + such as strdup() whose names violate the ISO C standard (the standard
1926 + says the strXXX names are reserved for the standard), but warns you of
1927 + the standards violation. That warning is 4996, along with other warnings
1928 + that tell you you're using a function that Microsoft thinks you
1929 + shouldn't.
1930 +
1931 + Well, POSIX is more important than that element of ISO C, so we disable
1932 + that warning.
1933 +
1934 + FYI, msvcrt also defines _strdup(), etc, which doesn't violate the
1935 + naming standard. But since other environments don't define _strdup(),
1936 + we can't use it in portable code.
1937 +*/
1938 +#pragma warning(disable:4996)
1939 +#endif
1940 +
1941 +#endif
1942 --
1943 1.6.5.2
1944

  ViewVC Help
Powered by ViewVC 1.1.28