Re: Testing the value of a variable defined with m4_define (configure.ac)

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

 



On 5 Nov 2011, at 21:10, Thomas Adam wrote:
> previously defined:
> 
> if test x"$ISRELEASED" = "xyes"; then
>    VAR="somevalue"
>    VAR2="somevalue2"
> fi
> 
> Now, though, the shell script I mentioned is instead setting ISRELEAED
> like this:
> 
> m4_define([ISRELEASED], [$VALUE_OF_RELEASE_STATUS])
> 
> So my question is, how can I change the if test above to now test the
> value of ISRELEASED

Comparing an expansion at m4 time to insert shell code conditionally:

m4_if(ISRELEASED, [yes], [VAR=somevalue; VAR2=somevalue2])

Generating code to compare the expansion at shell-time:

if yes = "ISRELEASED"; then VAR=somevalue; VAR2=somevalue2; fi

HTH,
-- 
Gary V. Vaughan (gary AT gnu DOT org)

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux