autoconf
[Top][All Lists]
Advanced

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

RE: finding the value of a preprocessor symbol


From: David Byron
Subject: RE: finding the value of a preprocessor symbol
Date: Thu, 21 Jan 2010 16:17:37 -0800

On Thursday, January 21, 2010, John Calcote wrote:

> On 1/21/2010 4:38 PM, David Byron wrote:
> > Let's say I have a header file named foo.h that contains:
> >
> > #define FOO an_interesting_value
> >
> > (I think) I'm looking for a macro like this:
> >
> > AC_GET_VALUE([foo.h],[FOO])
> >
> > that populates ac_cv_value_of_FOO with an_interesting_value
> >    
> 
> This is totally not portable, but...
> 
> $ cpp -dM foo.h | grep FOO
> #define FOO an_interesting_value

Good idea.  Replace cpp -dM with $CPP $CPPFLAGS and I'm getting close.  Also
starting to convince myself I'm barking up the wrong tree...

Thanks.

-DB





reply via email to

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