asterisk: update AST_EXT_TOOL_CHECK for OpenWrt
Issue #672 shows that the current macro has some pitfalls, at least when
running within OpenWrt's buildroot.
The macro is used to detect these tools:
1. xml2-config
2. mysql_config
3. neon-config
4. net-snmp-config
5. sdl-config (we're not using SDL)
The macro also adds configure arguments that allow to specify a path
like so:
--with-mysqlclient=PATH
Macro problems:
1. If no PATH is specified, it adds "/bin" to the search path.
Obviously this is a bad thing when cross-compiling.
2. If a PATH is specified, it adds it to the start of every include
and library path it encounters. These paths are then broken.
This commit makes problem 1 go away by making the addition of
"${$1_DIR}/bin" to the PATH dependent on there being a PATH handed to
the macro. An alternative would be to remove the PATH addition
altogether, but then the macro wouldn't behave as expected.
It also removes the path filtering of the include and lib dirs to
address problem 2.
Closes #672
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>