[asterisk-dev] [Code Review] 3550: build: Allow autoconf/ast_ext_tool_check to handle cross-compiling better

George Joseph reviewboard at asterisk.org
Tue May 20 16:00:22 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3550/
-----------------------------------------------------------

(Updated May 20, 2014, 3 p.m.)


Review request for Asterisk Developers.


Changes
-------

Oops...Used bash-specific pattern substitution.  Converted to sed and retested.


Repository: Asterisk


Description
-------

ast_ext_tool_check.m4 isn't handling cases where a path to a package is provided (E.G. --with-mysqlclient=/some/sysroot) and the package has a config tool (E.G. mysql_config) and the package has its own subdirectories in include or lib.  For example, mysql's libraries are in ${MYSQLCLIENT_DIR}/usr/lib/mysql but ast_ext_tool_check sets MYSQLCLIENT_LIB to ${MYSQLCLIENT_DIR}/usr/lib.  libxml2 has the same problem with its includes.  They're in ${LIBXML2_DIR}/usr/include/libxml2 not directly in ${LIBXML2_DIR}/usr/include.  Both cause configure to fail and there are others in the same boat.

The problem is caused by logic in ast_ext_tool_check that overrides the result of the config tool's --cflags and --libs options if package_DIR is set.

This patch prepends package_DIR (if specified) to the -L and -I results from the package's config tool instead of overriding them.

I also did a little reformatting.  It was ugly.


Diffs (updated)
-----

  branches/11/autoconf/ast_ext_tool_check.m4 414212 

Diff: https://reviewboard.asterisk.org/r/3550/diff/


Testing
-------

Tested with cross compile for armv7hl platform (package paths specified) and with native x86_64 compile (no package paths specified).


Thanks,

George Joseph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140520/e028f1d4/attachment.html>


More information about the asterisk-dev mailing list