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: John Calcote
Subject: Re: finding the value of a preprocessor symbol
Date: Thu, 21 Jan 2010 16:58:46 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1

Hi David,

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

A little string manipulation will put the value in a shell variable.

John





reply via email to

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