asterisk/autoconf
George Joseph 988eb0f82f build: Allow autoconf/ast_ext_tool_check to handle cross-compiling better.
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.

Tested by: George Joseph
Tested by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3550/
........

Merged revisions 416870 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 416871 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-20 21:59:08 +00:00
..
acx_pthread.m4 Merged revisions 151240 via svnmerge from 2008-10-20 04:59:04 +00:00
ast_c_compile_check.m4 Cleanup a bit more by getting rid of useless version defines. Also make library detection use passed CFLAGS. 2010-05-09 02:14:04 +00:00
ast_c_declare_check.m4 Fix compile problem when old version of libvorbisfile v1.1.2 is used. 2012-02-16 19:51:15 +00:00
ast_c_define_check.m4 Cleanup a bit more by getting rid of useless version defines. Also make library detection use passed CFLAGS. 2010-05-09 02:14:04 +00:00
ast_check_gnu_make.m4 Merged revisions 180941 via svnmerge from 2009-03-10 22:03:41 +00:00
ast_check_mandatory.m4 Merged revisions 151240 via svnmerge from 2008-10-20 04:59:04 +00:00
ast_check_openh323.m4 Allow H.323 Plus library to be used in addition to the OpenH323 library 2009-03-17 20:47:31 +00:00
ast_check_osptk.m4 Update configure script to check for OSP toolkit 3.5.0. 2009-05-26 22:40:34 +00:00
ast_check_pwlib.m4 Update configure script to be compatible with ptlib 2.10.9 2013-01-29 02:12:04 +00:00
ast_ext_lib.m4 Fix whitespace in AST_EXT_LIB_CHECK macro. 2013-03-14 16:57:36 +00:00
ast_ext_tool_check.m4 build: Allow autoconf/ast_ext_tool_check to handle cross-compiling better. 2014-06-20 21:59:08 +00:00
ast_func_fork.m4 Merged revisions 277738 via svnmerge from 2010-07-17 17:42:32 +00:00
ast_gcc_attribute.m4 Ensure that all AC_LANG_PROGRAM calls in the configure script are properly quoted. 2012-01-14 16:43:12 +00:00
ast_pkgconfig.m4 Macro AST_PKG_CONFIG_CHECK to use chkconfig 2012-05-14 13:42:49 +00:00
ast_prog_egrep.m4 Merged revisions 151240 via svnmerge from 2008-10-20 04:59:04 +00:00
ast_prog_ld.m4 Merged revisions 151240 via svnmerge from 2008-10-20 04:59:04 +00:00
ast_prog_ld_gnu.m4 Merged revisions 151240 via svnmerge from 2008-10-20 04:59:04 +00:00
ast_prog_sed.m4 Merged revisions 180941 via svnmerge from 2009-03-10 22:03:41 +00:00
libcurl.m4 Ensure that all AC_LANG_PROGRAM calls in the configure script are properly quoted. 2012-01-14 16:43:12 +00:00