hexchat/hexchat — pull request #96 by Arnavion (2012-09-20 19:41:42+00:00)
Title: Broken #defines after autoconf + configure due to misbehaving AS_AC_EXPAND macro

On my system (openSUSE 12.2 / bash 4.2.24(1)-release (x86_64-suse-linux-gnu) ), the shell doesn't like that the '=' character in 'if test...' doesn't have spaces around it. This causes the test to always be true, and thus the loop breaks on the first iteration leading to the AS_AC_EXPAND macro only expanding once.

This leads to two #define's in config.h containing broken values: HEXCHATSHAREDIR and DBUS_SERVICES_DIR. The both contain the literal string "${prefix}". For example, HEXCHATSHAREDIR ends us as

```#define HEXCHATSHAREDIR "${prefix}/share"```

instead of

```#define HEXCHATSHAREDIR "/usr/local/share"```

My version of bash is consistent in that test "x"="y" is ALWAYS true, and test "x" = "y" (with the space around the =) is ALWAYS false, even though this behavior doesn't seem to be reproducible by anyone else.

```
[03:39:36] arnavion@arnaviont61:~>if test "x"="y"; then echo 5; else echo 6; fi
5
[03:39:48] arnavion@arnaviont61:~>if test "x" = "y"; then echo 5; else echo 6; fi
6
```

Putting the spaces doesn't break anyone else's builds at least.