diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-05-26 00:29:40 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-05-26 00:29:40 +0000 |
commit | 9a975f1fd2b6ae88acdd1e7917d73d5de148eb4a (patch) | |
tree | 9a976cd88a4ba29b26429a21f664c430c122d350 /configure.ac | |
parent | 3a066e3c03bd72958610fd553d76907331f7a520 (diff) |
Use configure to determine the prefixes and include directories properly.
This ensures cross-platform compatibility, even among Linux distributions,
which don't always put headers in the same place.
(closes issue #17391)
Reported by: loloski
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@265747 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 944860e0d..ce2fb73e2 100644 --- a/configure.ac +++ b/configure.ac @@ -921,10 +921,13 @@ AST_EXT_LIB_CHECK([ICONV], [iconv], [iconv_open], [iconv.h]) # Some versions of Linux package iconv in glibc AST_EXT_LIB_CHECK([ICONV], [c], [iconv_close], [iconv.h]) -AST_EXT_LIB_CHECK([ICAL], [ical], [icaltimezone_new], [ical.h], [${PTHREAD_LIBS}], [${PTHREAD_CFLAGS}]) - # Some distributions (like RedHat) add a libical subdirectory for the headers AST_EXT_LIB_CHECK([ICAL], [ical], [icaltimezone_get_utc_timezone], [libical/ical.h], [${PTHREAD_LIBS}], [${PTHREAD_CFLAGS}]) +if test x"${PBX_ICAL}" = x1; then + ICAL_INCLUDE+=-I/usr/include/libical +fi + +AST_EXT_LIB_CHECK([ICAL], [ical], [icaltimezone_new], [ical.h], [${PTHREAD_LIBS}], [${PTHREAD_CFLAGS}]) AST_EXT_LIB_CHECK([IKSEMEL], [iksemel], [iks_start_sasl], [iksemel.h]) @@ -1662,7 +1665,11 @@ fi AST_EXT_LIB_CHECK([LUA], [lua5.1], [luaL_newstate], [lua5.1/lua.h], [-lm]) if test "x${PBX_LUA}" = "x1" ; then - AC_DEFINE_UNQUOTED([LUA51_PREFIX], [1], [Define to 1 if lua is found with a lua5.1 prefix]) + if test x"${LUA_DIR}" = x; then + LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua5.1" + else + LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua5.1" + fi fi # Some distributions (like SuSE) remove the 5.1 suffix. |