[Top][All Lists]

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

Re: how to AC_DEFINE a C macro

From: Bruce Korb
Subject: Re: how to AC_DEFINE a C macro
Date: Tue, 27 Jul 2004 10:16:46 -0700

Stony Yakovac wrote:
> I have a case where I am trying to write an autoconf m4 function to
> allow me to use several different APIs the same.  In at least one case,
> that requires me to define a macro, not just a simple
> #define FOO 1
> In trying to do that, I found that AC_DEFINE doesn't like parens no
> matter how many "[]"'s you put them in.  That lead me to finding the
> definition of AC_DEFINE and AC_DEFINE_UNQUOTED (mysteriously
> identical?), which are listed below.
> So the questions are:
>         1) how would I make an m4 function similar to this
> that would handle macros?  e.g.
> #define theirFunc(a) myFunc(a,0)
>         2) how is it that AC_DEFINE_UNQUOTED does what its name says?
>         3) Can someone help me understand the magic lines here?
> I don't understand the "address@hidden:@define]" string, but I assume that it
> magically gets transformed into "#define".  I also do not understand
> the trailing "1" on the m4_if.

You probably want to use the "test" variation on the macro generator.

reply via email to

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