aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac32
1 files changed, 26 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index e2892b73f..dc0df7df0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -241,8 +241,7 @@ AST_EXT_LIB_SETUP([OPENH323], [OpenH323], [h323])
AST_EXT_LIB_SETUP([RADIUS], [Radius Client], [radius])
AST_EXT_LIB_SETUP([SDL], [Sdl], [sdl])
AST_EXT_LIB_SETUP([SDL_IMAGE], [Sdl Image library], [SDL_image])
-AST_EXT_LIB_SETUP([SACLM], [SAForum AIS CLM], [SaClm])
-AST_EXT_LIB_SETUP([SAEVT], [SAForum AIS EVT], [SaEvt])
+AST_EXT_LIB_SETUP([OPENAIS], [OpenAIS], [openais])
AST_EXT_LIB_SETUP([SPEEX], [Speex], [speex])
AST_EXT_LIB_SETUP([SPEEXDSP], [Speexdsp], [speexdsp])
AST_EXT_LIB_SETUP([SQLITE], [SQLite], [sqlite])
@@ -1351,10 +1350,31 @@ AST_EXT_LIB_CHECK([LUA], [lua5.1], [luaL_newstate], [lua5.1/lua.h])
AST_EXT_LIB_CHECK([RADIUS], [radiusclient-ng], [rc_read_config], [radiusclient-ng.h])
-AST_EXT_LIB_CHECK([SACLM], [SaClm], [saClmInitialize], [openais/saClm.h], [-L/usr/lib/openais])
-AST_EXT_LIB_CHECK([SACLM], [SaClm], [saClmInitialize], [openais/saClm.h])
-AST_EXT_LIB_CHECK([SAEVT], [SaEvt], [saEvtInitialize], [openais/saEvt.h], [-L/usr/lib/openais])
-AST_EXT_LIB_CHECK([SAEVT], [SaEvt], [saEvtInitialize], [openais/saEvt.h])
+# This is a bit complex... in reality, Asterisk's AIS support is dependent on finding
+# *any* implementation of AIS, not just OpenAIS. However, the configure script needs
+# to know the specifics of each possible implementation, and then represent the one
+# that was found as 'AIS'.
+
+PBX_AIS=0
+
+# OpenAIS installs its libraries into /usr/lib/openais by default, so check there
+
+AST_EXT_LIB_CHECK([OPENAIS], [SaClm], [saClmInitialize], [openais/saClm.h], [-L/usr/lib/openais])
+
+if test "${PBX_OPENAIS}" = 1; then
+ PBX_AIS=1
+ if test -n "${OPENAIS_DIR}"; then
+ AIS_INCLUDE="${OPENAIS_INCLUDE}/openais"
+ AIS_LIB="-lSaEvt ${OPENAIS_LIB}"
+ else
+ AIS_INCLUDE="-I/usr/include/openais"
+ AIS_LIB="-lSaClm -lSaEvt -L/usr/lib/openais"
+ fi
+fi
+
+AC_SUBST(PBX_AIS)
+AC_SUBST(AIS_INCLUDE)
+AC_SUBST(AIS_LIB)
AST_EXT_LIB_CHECK([SPEEX], [speex], [speex_encode], [speex/speex.h], [-lm])