arabica/m4/has_parser.m4

31 lines
1.1 KiB
Text
Raw Normal View History

2006-09-12 23:21:48 +02:00
AC_DEFUN([ARABICA_HAS_XML_PARSER],
[
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
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
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
PARSER_LIBS="$PARSER_LIBS $XERCES_LIBS"
elif test "$USE_GARDEN-" != "-"; then
2007-01-15 18:40:06 +01:00
AC_MSG_NOTICE([[building with Garden]])
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)
])