autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Macro writing


From: Mattias Brändström
Subject: Re: Macro writing
Date: Thu, 5 Jun 2003 11:00:23 +0200 (CEST)

Hello again!

Now I have a revised version of my macro. If anyone have the time to say
anything about it it would be greatly appricated!

AC_DEFUN([RKC_XERCES], [

AC_ARG_WITH(xerces-prefix, [  --with-xerces-prefix=PFX   Prefix where
Xerces-C is installed (optional)],
            [xerces_prefix="$withval"], [xerces_prefix=""])

AC_LANG_PUSH([C++])
AC_MSG_CHECKING([for Xerces-C])

if test -n "$xerces_prefix" ; then
  CXXFLAGS="$CXXFLAGS -I$xerces_prefix/include"
  LDFLAGS="$LDFLAGS -L$xerces_prefix/lib"
fi

LIBS="-lxerces-c $LIBS"

AC_LINK_IFELSE([
 AC_LANG_PROGRAM(
  [
  #include <xercesc/parsers/XercesDOMParser.hpp>
  #include <iostream>
  XERCES_CPP_NAMESPACE_USE
  ],
  [
  XercesDOMParser* parser = new XercesDOMParser();
  ])],
 [AC_MSG_RESULT([yes])],
 [AC_MSG_FAILURE([missing])
])

AC_LANG_POP
])


Have a nice day!

Regards,
Mattias




reply via email to

[Prev in Thread] Current Thread [Next in Thread]