Don't build xslt without xml

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19255 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2004-05-07 11:06:39 +00:00
parent 7c202de0d1
commit 5a743c6fcf
2 changed files with 57 additions and 49 deletions

View file

@ -1,3 +1,8 @@
2004-05-07 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac: don't attempt to find xslt support if xml support
was disabled or not found.
2004-05-06 David Ayers <d.ayers@inode.at> 2004-05-06 David Ayers <d.ayers@inode.at>
* Headers/Additions/GNUstepBase/GSObjCRuntime.h/m * Headers/Additions/GNUstepBase/GSObjCRuntime.h/m

View file

@ -979,6 +979,7 @@ AC_ARG_ENABLE(xml,
[ --disable-xml Compile even if XML-dependencies are not met],, [ --disable-xml Compile even if XML-dependencies are not met],,
enable_xml=yes) enable_xml=yes)
if test $enable_xml = yes; then
# Save CFLAGS and LIBS as AM_PATH_XML clobbers these variables regardless # Save CFLAGS and LIBS as AM_PATH_XML clobbers these variables regardless
# of the success of the macro. # of the success of the macro.
saved_LIBS="$LIBS" saved_LIBS="$LIBS"
@ -990,32 +991,15 @@ if test $enable_libxml = yes; then
INCLUDE_FLAGS="$INCLUDE_FLAGS $XML_CFLAGS" INCLUDE_FLAGS="$INCLUDE_FLAGS $XML_CFLAGS"
LIBS="$LIBS $XML_LIBS" LIBS="$LIBS $XML_LIBS"
HAVE_LIBXML=1 HAVE_LIBXML=1
AC_DEFINE(HAVE_LIBXML,1, AC_DEFINE(HAVE_LIBXML,1,[Define if libxml available])
[Define if libxml available])
else
HAVE_LIBXML=0
# Restore the CFLAGS and LIBS because AM_PATH_XML messes them
LIBS="$saved_LIBS"
CFLAGS="$saved_CFLAGS"
if test $enable_xml = yes; then
echo
echo "You most likely do not want to build base without XML support."
echo "For instance, MacOS-X compatible property lists require XML."
echo "If you really want to build -base without XML support, add --disable-xml"
echo "to the configure arguments."
AC_MSG_ERROR([Missing support for XML functionality.])
fi
AC_MSG_WARN([Missing support for XML funtionality.])
fi
AC_SUBST(HAVE_LIBXML)
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Check for (optional) libxslt # Check for (optional) libxslt
#-------------------------------------------------------------------- #--------------------------------------------------------------------
AC_ARG_ENABLE(xslt, AC_ARG_ENABLE(xslt,
[ --disable-xslt Compile even if XSLT-dependency is not met],, [ --disable-xslt Compile even if XSLT-dependency is not met],,
enable_xslt=no) enable_xslt=yes)
if test $enable_xslt = yes; then
AC_CHECK_LIB(xslt, xsltApplyStylesheet, xslt_ok=yes, xslt_ok=no) AC_CHECK_LIB(xslt, xsltApplyStylesheet, xslt_ok=yes, xslt_ok=no)
if test "$xslt_ok" = "yes"; then if test "$xslt_ok" = "yes"; then
AC_CHECK_HEADER(libxslt/xslt.h, xslthdr_ok=yes, xslthdr_ok=no) AC_CHECK_HEADER(libxslt/xslt.h, xslthdr_ok=yes, xslthdr_ok=no)
@ -1028,17 +1012,36 @@ if test "$xslt_ok" = "yes"; then
AC_DEFINE(HAVE_LIBXSLT,1,[Define if libxslt available]) AC_DEFINE(HAVE_LIBXSLT,1,[Define if libxslt available])
LIBS="$LIBS -lxslt" LIBS="$LIBS -lxslt"
else else
if test $enable_xslt = yes; then
echo echo
echo "You most likely do not want to build base without XSLT support." echo "You most likely do not want to build base without XSLT support."
echo "If you really want to build -base without XSLT support, add --disable-xslt" echo "If you really want to build -base without XSLT support, add --disable-xslt"
echo "to the configure arguments." echo "to the configure arguments."
AC_MSG_ERROR([Missing support for XSLT functionality.]) AC_MSG_WARN([Missing support for XSLT functionality.])
fi fi
AC_MSG_WARN([Missing support for XSLT funtionality.]) else
HAVE_LIBXSLT=0
AC_MSG_WARN([Disabled support for XSLT funtionality.])
fi fi
AC_SUBST(HAVE_LIBXSLT) AC_SUBST(HAVE_LIBXSLT)
else
HAVE_LIBXML=0
# Restore the CFLAGS and LIBS because AM_PATH_XML messes them
LIBS="$saved_LIBS"
CFLAGS="$saved_CFLAGS"
echo
echo "You most likely do not want to build base without XML support."
echo "For instance, MacOS-X compatible property lists require XML."
echo "If you really want to build -base without XML support, add --disable-xml"
echo "to the configure arguments."
AC_MSG_ERROR([Missing support for XML functionality.])
fi
else
AC_MSG_WARN([Disabled support for XML funtionality.])
HAVE_LIBXML=0
fi
AC_SUBST(HAVE_LIBXML)
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Check GMP for NSDecimal # Check GMP for NSDecimal
#-------------------------------------------------------------------- #--------------------------------------------------------------------