autoheader an AC_DEFINE

2022-09-02 Thread aotto
Hi, I use autoconf to config my application. My problem is that I require a macro with     #define NAME 1 or     #define NAME 0 autoconf / autoheader uses for '#define NAME 0' the value '#undef NAME'     Q: How I teach AC_CONFIG_HEADERS etc to use the "0" instead of "#undef" mfg

Re: autoheader an AC_DEFINE

2022-09-02 Thread Zack Weinberg
On Fri, Sep 2, 2022, at 2:03 PM, aotto wrote: > Hi, > > I use autoconf to config my application. My problem is that I require a > macro with > >     #define NAME 1 > > or > >     #define NAME 0 > > autoconf / autoheader uses for '#define NAME 0' the value '#undef NAME' This ought to work: AS_I

Re: autoheader an AC_DEFINE

2022-09-02 Thread aotto
Hi, I had 2 problems: 1. my AC_DEFINE was only in the positive AS_IF state and the default #undef was chosen for the negative state → Solution: As mentioned, add a variable and remove AC_DEFINE from the condition 2. the AC_DEFINE does not use the variable, the AC_DEFINE_UNQUOTED has done