> I'm using autoconf and automake to make manage the makefiles
> for my project which uses xerces. And basically what I want
> to do is to have ./configure for my project to complain if it
> can't find the Xerces-C libraries and headers. If Xerces-C is
> installed would like ./configure to figure out where it's
> installed (if it's installed in a non stantard location).
autoconf is not fully C++ aware in certain senses, the AC_CHECK_LIB macro being one.
To test a C++ link requires an attempt to fully
compile and link a working program, basically.
We did this in our project using this macro sequence:
AC_CHECK_HEADER([xercesc/dom/DOM.hpp],,
AC_MSG_ERROR([unable to find xerces header files]))
saved_LIBS="$LIBS"
LIBS="-lxerces-c $LIBS"
AC_TRY_LINK(
[#include <xercesc/util/PlatformUtils.hpp>],
[xercesc::XMLPlatformUtils::Initialize()],
[AC_DEFINE(HAVE_LIBXERCESC,1,[Define if Xerces-C library was found])],
[AC_MSG_ERROR([unable to link with Xerces])
LIBS="$saved_LIBS"
])
-- Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]