mirror of
https://github.com/jezhiggins/arabica
synced 2024-12-29 22:23:27 +01:00
35acd2eea7
meta-programming magic so that everything builds through with MSXML. See http://www.jezuk.co.uk/cgi-bin/view/SAX/news?id=2713 for details of the problem. This may break VC6, but I haven't checked
92 lines
1.8 KiB
ArmAsm
92 lines
1.8 KiB
ArmAsm
#define pasty(m, n) m##n
|
|
#define include pasty(#, include)
|
|
#define ifdef pasty(#, ifdef)
|
|
#define ifndef pasty(#, ifndef)
|
|
#define endif pasty(#, endif)
|
|
#define define pasty(#, define)
|
|
#define message pasty(#, pragma message)
|
|
#define undef pasty(#, undef)
|
|
#define error pasty(#, error)
|
|
#define else pasty(#, else)
|
|
#define comment pasty(#, pragma comment)
|
|
|
|
|
|
ifndef ARABICA_PARSERCONFIG_H
|
|
define ARABICA_PARSERCONFIG_H
|
|
|
|
#ifdef USE_LIBXML2
|
|
include <SAX/wrappers/saxlibxml2.h>
|
|
undef DEF_SAX_P
|
|
define DEF_SAX_P libxml2_wrapper
|
|
#ifdef _MSC_VER
|
|
message("Including libxml2")
|
|
comment(lib, "libxml2.lib")
|
|
#endif
|
|
#endif
|
|
#ifdef USE_MSXML
|
|
#ifndef _MSC_VER
|
|
error "Can only use MSXML on Windows"
|
|
#endif
|
|
message("Including MSXML")
|
|
include <SAX/wrappers/saxmsxml2.h>
|
|
undef DEF_SAX_P
|
|
define DEF_SAX_P msxml2_wrapper
|
|
#endif
|
|
#ifdef USE_XERCES1
|
|
include <SAX/wrappers/saxxerces.h>
|
|
undef DEF_SAX_P
|
|
define DEF_SAX_P xerces_wrapper
|
|
#ifdef _MSC_VER
|
|
message("Including Xerces 1")
|
|
comment(lib, "xerces-c_1.lib")
|
|
#endif
|
|
#endif
|
|
#ifdef USE_XERCES
|
|
include <SAX/wrappers/saxxerces.h>
|
|
undef DEF_SAX_P
|
|
define DEF_SAX_P xerces_wrapper
|
|
#ifdef _MSC_VER
|
|
message("Including Xerces")
|
|
comment(lib, "xerces-c_2.lib")
|
|
#endif
|
|
#endif
|
|
#ifdef USE_GARDEN
|
|
#ifdef _MSC_VER
|
|
message("Including Garden")
|
|
#endif
|
|
include <SAX/parsers/saxgarden.h>
|
|
undef DEF_SAX_P
|
|
define DEF_SAX_P Garden
|
|
#endif
|
|
#ifdef USE_EXPAT
|
|
include <SAX/wrappers/saxexpat.h>
|
|
undef DEF_SAX_P
|
|
define DEF_SAX_P expat_wrapper
|
|
#ifdef _MSC_VER
|
|
message("Including Expat")
|
|
comment(lib, "libexpat.lib")
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef _MSC_VER
|
|
comment(lib, "wsock32.lib")
|
|
#endif
|
|
|
|
|
|
ifndef NO_DEFAULT_PARSER
|
|
ifdef DEF_SAX_P
|
|
namespace SAX
|
|
{
|
|
template<class string_type, class T0 = Arabica::nil_t, class T1 = Arabica::nil_t>
|
|
class XMLReader : public DEF_SAX_P<string_type, T0, T1> { };
|
|
} // namespace SAX
|
|
else
|
|
error "No default parser defined."
|
|
endif
|
|
endif
|
|
|
|
undef DEF_P
|
|
|
|
endif
|
|
|
|
|