Re: Setting a default value for an AC_ARG_VAR

2018-12-16 Thread Nick Bowler
On 12/16/18, Reuben Thomas wrote: > On Fri, 14 Dec 2018 at 14:51, Nick Bowler wrote: > >> >> If you want to set a value to a variable only if the variable is >> unset, a typical way to do that in shell programming is: >> >> : "${FOO=value-if-unset}" >> >> Or if you prefer also to set it the var

Re: Setting a default value for an AC_ARG_VAR

2018-12-16 Thread Reuben Thomas
On Fri, 14 Dec 2018 at 14:51, Nick Bowler wrote: > > If you want to set a value to a variable only if the variable is > unset, a typical way to do that in shell programming is: > > : "${FOO=value-if-unset}" > > Or if you prefer also to set it the variable is _empty_ (i.e., including > the case

Re: Setting a default value for an AC_ARG_VAR

2018-12-14 Thread Nick Bowler
On 12/14/18, Reuben Thomas wrote: > What's the right way to do this? I currently have: > > AC_ARG_VAR([WORD_SIZE], > [value of WORD_SIZE register [default: sizeof(long)]]) > if "$ac_cv_env_WORD_SIZE_set" != set; then > AC_CHECK_SIZEOF([long]) > ac_cv_env_WORD_SIZE_value=SIZEOF_LONG > fi > >

Setting a default value for an AC_ARG_VAR

2018-12-14 Thread Reuben Thomas
What's the right way to do this? I currently have: AC_ARG_VAR([WORD_SIZE], [value of WORD_SIZE register [default: sizeof(long)]]) if "$ac_cv_env_WORD_SIZE_set" != set; then AC_CHECK_SIZEOF([long]) ac_cv_env_WORD_SIZE_value=SIZEOF_LONG fi which seems to work, but I'm conscious that I'm relyi