diff options
Diffstat (limited to 'libxerces-c/xercesc')
-rw-r--r-- | libxerces-c/xercesc/.gitattributes | 8 | ||||
-rw-r--r-- | libxerces-c/xercesc/buildfile | 73 | ||||
-rw-r--r-- | libxerces-c/xercesc/config.h | 24 | ||||
-rw-r--r-- | libxerces-c/xercesc/util/.gitattributes | 2 | ||||
l--------- | libxerces-c/xercesc/util/Transcoders/MacOSUnicodeConverter | 1 | ||||
l--------- | libxerces-c/xercesc/util/Transcoders/Win32 | 1 | ||||
-rw-r--r-- | libxerces-c/xercesc/util/Xerces_autoconf_config.hpp | 11 |
7 files changed, 100 insertions, 20 deletions
diff --git a/libxerces-c/xercesc/.gitattributes b/libxerces-c/xercesc/.gitattributes new file mode 100644 index 0000000..b814475 --- /dev/null +++ b/libxerces-c/xercesc/.gitattributes @@ -0,0 +1,8 @@ +dom symlink=dir +framework symlink=dir +internal symlink=dir +parsers symlink=dir +sax symlink=dir +sax2 symlink=dir +validators symlink=dir +xinclude symlink=dir diff --git a/libxerces-c/xercesc/buildfile b/libxerces-c/xercesc/buildfile index 7124293..88cf9b1 100644 --- a/libxerces-c/xercesc/buildfile +++ b/libxerces-c/xercesc/buildfile @@ -1,29 +1,54 @@ # file : xercesc/buildfile # license : Apache License 2.0; see accompanying LICENSE file +network = $config.libxerces_c.network +transcoder_icu = $config.libxerces_c.transcoder_icu + +intf_libs = # Interface dependencies. +impl_libs = # Implementation dependencies. + # Note that the installed util/NetAccessors/Curl/CurlURLInputStream.hpp # includes the libcurl headers. # -import int_libs = libcurl%lib{curl} +if $network + import intf_libs += libcurl%lib{curl} -import imp_libs = libicuuc%lib{icuuc} -import imp_libs += libicui18n%lib{icui18n} +if $transcoder_icu +{ + import impl_libs += libicuuc%lib{icuuc} + import impl_libs += libicui18n%lib{icui18n} +} -lib{xerces-c}: {h }{config } \ - {hxx txx cxx}{*/** -util/FileManagers/** -util/XercesVersion} \ - {hxx }{ util/XercesVersion} \ - $int_libs $imp_libs +lib{xerces-c}: {h }{config} \ + {hxx txx cxx}{*/** -util/FileManagers/** \ + -util/NetAccessors/** \ + -util/Transcoders/** \ + -util/XercesVersion} \ + {hxx }{ util/XercesVersion} tclass = $cxx.target.class tsys = $cxx.target.system -windows = ($tclass == 'windows') +macos = ($tclass == 'macos') +windows = ($tclass == 'windows') lib{xerces-c}: {h c}{stricmp strnicmp} \ util/FileManagers/{hxx cxx}{PosixFileMgr }: include = (!$windows) lib{xerces-c}: util/FileManagers/{hxx cxx}{WindowsFileMgr}: include = $windows +lib{xerces-c}: util/NetAccessors/Curl/{hxx cxx}{*}: include = $network + +lib{xerces-c}: util/Transcoders/ICU/{hxx cxx}{*}: include = $transcoder_icu + +lib{xerces-c}: util/Transcoders/MacOSUnicodeConverter/{hxx cxx}{*}: \ +include = (!$transcoder_icu && $macos) + +lib{xerces-c}: util/Transcoders/Win32/{hxx cxx}{*}: \ +include = (!$transcoder_icu && $windows) + +lib{xerces-c}: $intf_libs $impl_libs + # Include the generated version header into the distribution (so that we # don't pick up an installed one) and don't remove it when cleaning in src (so # that clean results in a state identical to distributed). @@ -44,6 +69,16 @@ util/hxx{XercesVersion}: util/in{XercesVersion} $src_root/manifest # Build options. # +if $network + cc.poptions += -DXERCES_USE_NETACCESSOR_CURL=1 + +if $transcoder_icu + cc.poptions += -DXERCES_USE_TRANSCODER_ICU=1 +elif $macos + cc.poptions += -DXERCES_USE_TRANSCODER_MACOSUNICODECONVERTER=1 +elif $windows + cc.poptions += -DXERCES_USE_TRANSCODER_WINDOWS=1 + cc.poptions += -DXERCES_BUILDING_LIBRARY -DHAVE_CONFIG_H -D_THREAD_SAFE if $windows @@ -91,7 +126,8 @@ switch $tclass, $tsys # cxx.loptions += -Wl,--no-undefined - cxx.libs += -lws2_32 + if $network + cxx.libs += -lws2_32 } case 'windows' { @@ -99,7 +135,11 @@ switch $tclass, $tsys # cxx.aoptions += /IGNORE:4221 - cxx.libs += ws2_32.lib + if! $transcoder_icu + cxx.libs += advapi32.lib + + if $network + cxx.libs += ws2_32.lib } case 'linux' { @@ -107,11 +147,18 @@ switch $tclass, $tsys # cxx.loptions += -Wl,--no-undefined - cxx.libs += -lm -lpthread + cxx.libs += -lm -pthread + } + case 'macos' + { + if! $transcoder_icu + cxx.libs += -framework CoreServices + + cxx.libs += -pthread } default { - cxx.libs += -lpthread + cxx.libs += -pthread } } @@ -120,7 +167,7 @@ switch $tclass, $tsys lib{xerces-c}: { cxx.export.poptions = "-I$out_root" "-I$src_root" - cxx.export.libs = $int_libs + cxx.export.libs = $intf_libs } liba{xerces-c}: cxx.export.poptions += -DLIBXERCES_C_STATIC diff --git a/libxerces-c/xercesc/config.h b/libxerces-c/xercesc/config.h index 48bd880..53ae22e 100644 --- a/libxerces-c/xercesc/config.h +++ b/libxerces-c/xercesc/config.h @@ -23,17 +23,29 @@ # include <stdint.h> /* Requires C99. */ #endif -/* Use the ICU transcoder. +/* Transcoder. + * + * Note that depending on config.libxerces_c.transcoder_icu and + * cxx.target.class values one of the following macros is defined via the + * preprocessor option (see buildfile and root.build for details). */ +/* #define XERCES_USE_TRANSCODER_ICU 1 -#undef XERCES_USE_TRANSCODER_GNUICONV -#undef XERCES_USE_TRANSCODER_ICONV #undef XERCES_USE_TRANSCODER_MACOSUNICODECONVERTER #undef XERCES_USE_TRANSCODER_WINDOWS +*/ +#undef XERCES_USE_TRANSCODER_GNUICONV +#undef XERCES_USE_TRANSCODER_ICONV -/* Use the Curl net accessor. +/* Net accessor. + * + * Note that the XERCES_USE_NETACCESSOR_CURL macro is defined via the + * preprocessor option if the network support is enabled (see buildfile and + * root.build for details). */ +/* #define XERCES_USE_NETACCESSOR_CURL 1 +*/ #undef XERCES_USE_NETACCESSOR_CFURL #undef XERCES_USE_NETACCESSOR_SOCKET #undef XERCES_USE_NETACCESSOR_WINSOCK @@ -85,6 +97,10 @@ # define HAVE_FTIME 1 # define HAVE_STRICMP 1 # define HAVE_STRNICMP 1 +# define HAVE_WCSICMP 1 +# define HAVE_WCSLWR 1 +# define HAVE_WCSNICMP 1 +# define HAVE_WCSUPR 1 # define XERCES_HAVE_INTRIN_H 1 # define XERCES_PATH_DELIMITER_BACKSLASH 1 # define XERCES_HAVE_CPUID_INTRINSIC 1 diff --git a/libxerces-c/xercesc/util/.gitattributes b/libxerces-c/xercesc/util/.gitattributes new file mode 100644 index 0000000..05b35fc --- /dev/null +++ b/libxerces-c/xercesc/util/.gitattributes @@ -0,0 +1,2 @@ +FileManagers symlink=dir +regx symlink=dir diff --git a/libxerces-c/xercesc/util/Transcoders/MacOSUnicodeConverter b/libxerces-c/xercesc/util/Transcoders/MacOSUnicodeConverter new file mode 120000 index 0000000..5d4612d --- /dev/null +++ b/libxerces-c/xercesc/util/Transcoders/MacOSUnicodeConverter @@ -0,0 +1 @@ +../../../../upstream/src/xercesc/util/Transcoders/MacOSUnicodeConverter
\ No newline at end of file diff --git a/libxerces-c/xercesc/util/Transcoders/Win32 b/libxerces-c/xercesc/util/Transcoders/Win32 new file mode 120000 index 0000000..6ec82cb --- /dev/null +++ b/libxerces-c/xercesc/util/Transcoders/Win32 @@ -0,0 +1 @@ +../../../../upstream/src/xercesc/util/Transcoders/Win32
\ No newline at end of file diff --git a/libxerces-c/xercesc/util/Xerces_autoconf_config.hpp b/libxerces-c/xercesc/util/Xerces_autoconf_config.hpp index 2b088cf..e88b063 100644 --- a/libxerces-c/xercesc/util/Xerces_autoconf_config.hpp +++ b/libxerces-c/xercesc/util/Xerces_autoconf_config.hpp @@ -135,10 +135,15 @@ * type. Note that falling back to defining the XERCES_PLATFORM_IMPORT macro * as empty would work for both the static and shared libraries (being * sub-optimal for the later) but only for functions. Xerces-C++, however, - * also exports data symbols, which cannot be imported this way. Thus we, - * just issue an error. + * also exports data symbols, which cannot be imported this way. Thus, + * where matters (Windows), we just issue an error. */ -# error define LIBXERCES_C_STATIC or LIBXERCES_C_SHARED preprocessor macro to signal Xerces-C++ library type being linked +# ifdef _WIN32 +# error define LIBXERCES_C_STATIC or LIBXERCES_C_SHARED preprocessor macro to signal Xerces-C++ library type being linked +# else +# define XERCES_PLATFORM_IMPORT +# define XERCES_PLATFORM_DECEXPORT +# endif #endif #ifdef XERCES_DLL_EXPORT |