mirror of
https://github.com/jezhiggins/arabica
synced 2024-12-26 21:58:39 +01:00
added --without-dom option to configure
This commit is contained in:
parent
288c31ca8d
commit
dc5070db07
5 changed files with 44 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
|||
AC_INIT(src/arabica.cpp)
|
||||
AC_CONFIG_HEADERS(include/SAX/ArabicaConfig.h)
|
||||
|
||||
AM_INIT_AUTOMAKE(arabica, Sept2006-2)
|
||||
AM_INIT_AUTOMAKE(arabica, Sept2006-3)
|
||||
|
||||
AC_PROG_CXX
|
||||
AM_PROG_LIBTOOL
|
||||
|
@ -9,6 +9,7 @@ AM_PROG_LIBTOOL
|
|||
AC_LANG_CPLUSPLUS
|
||||
|
||||
ARABICA_HAS_BOOST([1.32])
|
||||
ARABICA_WANT_DOM
|
||||
ARABICA_HAS_EXPAT
|
||||
ARABICA_HAS_LIBXML2
|
||||
ARABICA_HAS_XERCES
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
SUBDIRS = SAX DOM Utils
|
||||
if HAVE_BOOST
|
||||
SUBDIRS = SAX Utils
|
||||
if WANT_DOM
|
||||
SUBDIRS += DOM
|
||||
endif
|
||||
if WANT_XPATH
|
||||
SUBDIRS += XPath
|
||||
endif
|
||||
|
||||
|
|
|
@ -151,16 +151,21 @@ AC_DEFUN([ARABICA_HAS_BOOST],
|
|||
else
|
||||
AC_MSG_NOTICE('Your Boost libraries seems to old (version $_version). We need at least $boost_lib_version_shorten')
|
||||
fi
|
||||
AC_MSG_NOTICE([[Arabica will build, but XPath and some other features will not be available]])
|
||||
AC_MSG_NOTICE([[Arabica will build, but some features will not be available]])
|
||||
else
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
|
||||
fi
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
else
|
||||
AC_MSG_NOTICE([[Not searching for Boost. Arabica will build, but XPath and some other features will not be available]])
|
||||
AC_MSG_NOTICE([[Not searching for Boost. Arabica will build, but some features will not be available]])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_BOOST, test x$succeeded = xyes)
|
||||
if test "$succeeded" = "yes"; then
|
||||
boost_is_available=yes
|
||||
else
|
||||
boost_is_available=no
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
|
|
25
m4/want_dom.m4
Executable file
25
m4/want_dom.m4
Executable file
|
@ -0,0 +1,25 @@
|
|||
AC_DEFUN([ARABICA_WANT_DOM],
|
||||
[
|
||||
AC_ARG_WITH([dom],
|
||||
AS_HELP_STRING([--with-dom=yes|no],
|
||||
[Control whether DOM tests and examples are built. --with-dom=no to disable]),
|
||||
[if test "$withval" = "no"; then
|
||||
want_dom="no"
|
||||
else
|
||||
want_dom="yes"
|
||||
fi],
|
||||
[want_dom="yes"])
|
||||
if test x$want_dom = xno; then
|
||||
AC_MSG_NOTICE([[DOM disabled. DOM components will not be built.]])
|
||||
fi
|
||||
AM_CONDITIONAL(WANT_DOM, test "$want_dom" = "yes")
|
||||
if test "$want_dom" = "yes"; then
|
||||
if test "$boost_is_available" = "yes"; then
|
||||
want_xpath = "yes"
|
||||
fi
|
||||
fi
|
||||
if test "$want_xpath" != "yes"; then
|
||||
AC_MSG_NOTICE([[XPath disabled. XPath components will not be built.]])
|
||||
fi
|
||||
AM_CONDITIONAL(WANT_XPATH, test "$want_xpath" = "yes")
|
||||
])
|
|
@ -1,5 +1,8 @@
|
|||
SUBDIRS = DOM SAX2DOM
|
||||
if HAVE_BOOST
|
||||
SUBDIRS =
|
||||
if WANT_DOM
|
||||
SUBDIRS += DOM SAX2DOM
|
||||
endif
|
||||
if WANT_XPATH
|
||||
SUBDIRS += XPath
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue