2006-09-20 13:16:17 +02:00
|
|
|
|
2006-09-12 23:21:48 +02:00
|
|
|
AC_DEFUN([ARABICA_HAS_XML_PARSER],
|
|
|
|
[
|
2006-09-20 13:16:17 +02:00
|
|
|
if test "$HAVE_LIBXML2-$HAVE_EXPAT-$HAVE_XERCES-$USE_GARDEN" = "---"; then
|
2006-09-12 23:21:48 +02:00
|
|
|
AC_MSG_ERROR([[Cannot find an XML parser library. Arabica needs one of Expat, LibXML2 or Xerces]])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$HAVE_EXPAT-" != "-"; then
|
2007-01-15 18:40:06 +01:00
|
|
|
AC_MSG_NOTICE([[building with Expat]])
|
2006-09-12 23:21:48 +02:00
|
|
|
AC_DEFINE(USE_EXPAT, ,[define to build against Expat])
|
|
|
|
PARSER_HEADERS=$EXPAT_CFLAGS
|
2006-12-13 20:20:31 +01:00
|
|
|
PARSER_LIBS="$PARSER_LIBS $EXPAT_LIBS"
|
2006-09-12 23:21:48 +02:00
|
|
|
elif test "$HAVE_LIBXML2-" != "-"; then
|
2007-01-15 18:40:06 +01:00
|
|
|
AC_MSG_NOTICE([[building with LibXML2]])
|
2006-09-12 23:21:48 +02:00
|
|
|
AC_DEFINE(USE_LIBXML2, ,[define to build against LibXML2])
|
|
|
|
PARSER_HEADERS=$LIBXML2_CFLAGS
|
2006-12-13 20:20:31 +01:00
|
|
|
PARSER_LIBS="$PARSER_LIBS $LIBXML2_LIBS"
|
2006-09-12 23:21:48 +02:00
|
|
|
elif test "$HAVE_XERCES-" != "-"; then
|
2007-01-15 18:40:06 +01:00
|
|
|
AC_MSG_NOTICE([[building with Xerces]])
|
2006-09-12 23:21:48 +02:00
|
|
|
AC_DEFINE(USE_XERCES, ,[define to build against Xerces])
|
|
|
|
PARSER_HEADERS=$XERCES_CFLAGS
|
2006-12-13 20:20:31 +01:00
|
|
|
PARSER_LIBS="$PARSER_LIBS $XERCES_LIBS"
|
2006-09-20 13:16:17 +02:00
|
|
|
elif test "$USE_GARDEN-" != "-"; then
|
2007-01-15 18:40:06 +01:00
|
|
|
AC_MSG_NOTICE([[building with Garden]])
|
2006-09-20 13:16:17 +02:00
|
|
|
AC_DEFINE(USE_GARDEN, ,[define to build using Garden])
|
2006-09-12 23:21:48 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(PARSER_HEADERS)
|
|
|
|
AC_SUBST(PARSER_LIBS)
|
|
|
|
])
|