automake
[Top][All Lists]
Advanced

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

Defining Macros With Literal Values


From: Eric Lemings
Subject: Defining Macros With Literal Values
Date: Wed, 26 Oct 2005 13:33:18 -0600

Greetings,

I have a tricky little problem I was hoping someone could
help me with.  I am trying to write an Autotools macro that
extracts the value of a macro from a system header file
and defines another preprocessor macro with the same value.

Take the following short program for example.

        #include <stdio.h>
        int main () {
          printf ("%d %d %d\n", SEEK_SET, SEEK_CUR, SEEK_END);
        return (0);
      }

I would like to write a Autotools macro that defines another
macro using these same values.  If the program above produced:

        0 1 2

I would like to define alternate names in config.h such as:

        /* Define to the value of SEEK_SET from <stdio.h>. */
        #define MY_SEEK_SET 0
        ...

Can this be done in Autotools?  If so, how?

Thanks,
Eric.




reply via email to

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