[asterisk-commits] kpfleming: trunk r127017 - in /trunk: ./ build_tools/ include/asterisk/ res/ ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 1 12:22:47 CDT 2008


Author: kpfleming
Date: Tue Jul  1 12:22:47 2008
New Revision: 127017

URL: http://svn.digium.com/view/asterisk?view=rev&rev=127017
Log:
make the AIS checking a little more generic, and have a more useful configure script command line option for OpenAIS

Modified:
    trunk/build_tools/menuselect-deps.in
    trunk/configure
    trunk/configure.ac
    trunk/include/asterisk/autoconfig.h.in
    trunk/makeopts.in
    trunk/res/Makefile
    trunk/res/ais/ais.h
    trunk/res/res_ais.c

Modified: trunk/build_tools/menuselect-deps.in
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/menuselect-deps.in?view=diff&rev=127017&r1=127016&r2=127017
==============================================================================
--- trunk/build_tools/menuselect-deps.in (original)
+++ trunk/build_tools/menuselect-deps.in Tue Jul  1 12:22:47 2008
@@ -30,8 +30,7 @@
 POPT=@PBX_POPT@
 PORTAUDIO=@PBX_PORTAUDIO@
 PRI=@PBX_PRI@
-SACLM=@PBX_SACLM@
-SAEVT=@PBX_SAEVT@
+AIS=@PBX_AIS@
 RADIUS=@PBX_RADIUS@
 SPANDSP=@PBX_SPANDSP@
 SPEEX=@PBX_SPEEX@

Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?view=diff&rev=127017&r1=127016&r2=127017
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Tue Jul  1 12:22:47 2008
@@ -241,8 +241,7 @@
 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([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])
 

Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=127017&r1=127016&r2=127017
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Tue Jul  1 12:22:47 2008
@@ -539,6 +539,12 @@
 /* Define to indicate the ${OGG_DESCRIP} library version */
 #undef HAVE_OGG_VERSION
 
+/* Define this to indicate the ${OPENAIS_DESCRIP} library */
+#undef HAVE_OPENAIS
+
+/* Define to indicate the ${OPENAIS_DESCRIP} library version */
+#undef HAVE_OPENAIS_VERSION
+
 /* Define if your system has the OpenH323 libraries. */
 #undef HAVE_OPENH323
 
@@ -691,18 +697,6 @@
 
 /* Define RTLD_NOLOAD headers version */
 #undef HAVE_RTLD_NOLOAD_VERSION
-
-/* Define this to indicate the ${SACLM_DESCRIP} library */
-#undef HAVE_SACLM
-
-/* Define to indicate the ${SACLM_DESCRIP} library version */
-#undef HAVE_SACLM_VERSION
-
-/* Define this to indicate the ${SAEVT_DESCRIP} library */
-#undef HAVE_SAEVT
-
-/* Define to indicate the ${SAEVT_DESCRIP} library version */
-#undef HAVE_SAEVT_VERSION
 
 /* Define to 1 if your system has /sbin/launchd. */
 #undef HAVE_SBIN_LAUNCHD
@@ -1176,6 +1170,9 @@
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
 #endif
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
 
 /* Define like PROTOTYPES; this can be used by system headers. */
 #undef __PROTOTYPES

Modified: trunk/makeopts.in
URL: http://svn.digium.com/view/asterisk/trunk/makeopts.in?view=diff&rev=127017&r1=127016&r2=127017
==============================================================================
--- trunk/makeopts.in (original)
+++ trunk/makeopts.in Tue Jul  1 12:22:47 2008
@@ -154,11 +154,8 @@
 PWLIB_INCLUDE=@PWLIB_INCLUDE@
 PWLIB_LIB=@PWLIB_LIB@
 
-SACLM_INCLUDE=@SACLM_INCLUDE@
-SACLM_LIB=@SACLM_LIB@
-
-SAEVT_INCLUDE=@SAEVT_INCLUDE@
-SAEVT_LIB=@SAEVT_LIB@
+AIS_INCLUDE=@AIS_INCLUDE@
+AIS_LIB=@AIS_LIB@
 
 RADIUS_INCLUDE=@RADIUS_INCLUDE@
 RADIUS_LIB=@RADIUS_LIB@

Modified: trunk/res/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/res/Makefile?view=diff&rev=127017&r1=127016&r2=127017
==============================================================================
--- trunk/res/Makefile (original)
+++ trunk/res/Makefile Tue Jul  1 12:22:47 2008
@@ -35,6 +35,8 @@
 ael/ael.tab.o: ael/ael.tab.c ael/ael.tab.h ../include/asterisk/ael_structs.h
 ael/ael.tab.o: ASTCFLAGS+=-I. -Iael -DYYENABLE_NLS=0
 
+ais/clm.o ais/evt.o: ASTCFLAGS+=${AIS_INCLUDE}
+
 $(if $(filter res_ais,$(EMBEDDED_MODS)),modules.link,res_ais.so): ais/clm.o ais/evt.o
 
 $(if $(filter res_snmp,$(EMBEDDED_MODS)),modules.link,res_snmp.so): snmp/agent.o

Modified: trunk/res/ais/ais.h
URL: http://svn.digium.com/view/asterisk/trunk/res/ais/ais.h?view=diff&rev=127017&r1=127016&r2=127017
==============================================================================
--- trunk/res/ais/ais.h (original)
+++ trunk/res/ais/ais.h Tue Jul  1 12:22:47 2008
@@ -25,12 +25,12 @@
  * \arg http://www.openais.org/
  */
 
-#ifndef AST_AIS_H
-#define AST_AIS_H
+#ifndef RES_AIS_AIS_H
+#define RES_AIS_AIS_H
 
-#include <openais/saAis.h>
-#include <openais/saClm.h>
-#include <openais/saEvt.h>
+#include <saAis.h>
+#include <saClm.h>
+#include <saEvt.h>
 
 extern SaVersionT ais_version;
 
@@ -45,4 +45,4 @@
 
 const char *ais_err2str(SaAisErrorT error);
 
-#endif /* AST_AIS_H */
+#endif /* RES_AIS_AIS_H */

Modified: trunk/res/res_ais.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_ais.c?view=diff&rev=127017&r1=127016&r2=127017
==============================================================================
--- trunk/res/res_ais.c (original)
+++ trunk/res/res_ais.c Tue Jul  1 12:22:47 2008
@@ -29,8 +29,7 @@
  */
 
 /*** MODULEINFO
-	<depend>SaClm</depend>
-	<depend>SaEvt</depend>
+	<depend>ais</depend>
  ***/
 
 #include "asterisk.h"




More information about the asterisk-commits mailing list