autoconf
[Top][All Lists]
Advanced

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

Re: Macro writing


From: Ronald Landheer-Cieslak
Subject: Re: Macro writing
Date: Fri, 13 Jun 2003 16:00:50 +0200 (CEST)

I've attached what I'm currently using for Xerces detection. It's far from 
perfect (but WFM) and mostly reaped from the iconv/gettext equivalent.

Like I said: WFM (Works For Me)

HTH

rlc

On Thu, 5 Jun 2003, Mattias Brändström wrote:

> 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
> 
> 

Attachment: xerces-c.m4
Description: Xerces macro


reply via email to

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