Using AC_DEFINE with AC_ARG_ENABLE (or AC_ARG_WITH)

2019-08-15 Thread Chris Packham
Hi All, I'm trying to get a value provided on the ./configure invocation through to C code so it can be used. I'm trying to do this with AC_DEFINE but maybe this is a job for something else. Perhaps this is easiest to understand with some code so here's a dummy example == configure.ac == AC_PRER

Re: Using AC_DEFINE with AC_ARG_ENABLE (or AC_ARG_WITH)

2019-08-15 Thread Nick Bowler
Hi Chris, On 8/15/19, Chris Packham wrote: > I'm trying to get a value provided on the ./configure invocation > through to C code so it can be used. I'm trying to do this with > AC_DEFINE but maybe this is a job for something else. [...] > AC_DEFINE([ENTITY],[${enable_entity}],[Entity]) [...] > I

Re: Using AC_DEFINE with AC_ARG_ENABLE (or AC_ARG_WITH)

2019-08-15 Thread Mauro Aranda
Chris Packham writes: > AC_DEFINE([ENTITY],[${enable_entity}],[Entity]) I think you want to use AC_DEFINE_UNQUOTED here. AC_DEFINE_UNQUOTED([ENTITY],["${enable_entity}"],[Entity]) ___ Autoconf mailing list Autoconf@gnu.org https://lists.gnu.org/mailm

Re: Using AC_DEFINE with AC_ARG_ENABLE (or AC_ARG_WITH)

2019-08-15 Thread Chris Packham
Hi Nick, Mauro, On Thu, 2019-08-15 at 09:56 -0400, Nick Bowler wrote: > Hi Chris, > > On 8/15/19, Chris Packham wrote: > > > > I'm trying to get a value provided on the ./configure invocation > > through to C code so it can be used. I'm trying to do this with > > AC_DEFINE but maybe this is a j