I am modifying a configure.ac for use with AutoConf: http://mathpad.wikidot.com/acousto-configure-ac
The script points out that it needs to run on darwin, solaris, cygwin and linux.
I assume this is why it uses an arcane method of comparing strings:
foo="1"
if test "x$foo" != "x0"; then
This double negative makes it difficult to read through the code. Can I clean it up?
How might I implement a string comparison macro:
if STR_EQUAL( $foo, "1" ); then
Or:
if TRUE( $foo ); then
And this is the best way of solving the problem?
EDIT: apparently this script is written in M4 http://www.gnu.org/software/m4/manual/m4.html