summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2010-05-26 00:29:40 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2010-05-26 00:29:40 +0000
commita7498ae02e750221a0307e04a572af752a414ba2 (patch)
tree9a976cd88a4ba29b26429a21f664c430c122d350 /configure.ac
parent01db62bdbe085c8fe02c30a84ff125137540df86 (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: https://origsvn.digium.com/svn/asterisk/trunk@265747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
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.