Index: build_tools/menuselect-deps.in =================================================================== --- build_tools/menuselect-deps.in (revision 166901) +++ build_tools/menuselect-deps.in (working copy) @@ -28,6 +28,7 @@ SPEEX_PREPROCESS=@PBX_SPEEX_PREPROCESS@ SQLITE=@PBX_SQLITE@ SSL=@PBX_OPENSSL@ +SWIFT=@PBX_SWIFT@ TONEZONE=@PBX_TONEZONE@ USB=@PBX_USB@ UNIXODBC=@PBX_UNIXODBC@ Index: configure.ac =================================================================== --- configure.ac (revision 166901) +++ configure.ac (working copy) @@ -205,6 +205,7 @@ AST_EXT_LIB_SETUP([SPEEXDSP], [Speexdsp], [speexdsp]) AST_EXT_LIB_SETUP([SQLITE], [SQLite], [sqlite]) AST_EXT_LIB_SETUP([SUPPSERV], [mISDN Supplemental Services], [suppserv]) +AST_EXT_LIB_SETUP([SWIFT], [Swift Library], [swift]) AST_EXT_LIB_SETUP([OPENSSL], [OpenSSL], [ssl]) AST_EXT_LIB_SETUP([FREETDS], [FreeTDS], [tds]) AST_EXT_LIB_SETUP([TERMCAP], [Termcap], [termcap]) @@ -1401,6 +1402,52 @@ AC_LANG_PUSH(C++) +if test "${USE_SWIFT}" != "no"; then + AC_MSG_CHECKING(for swift_engine_open in -lswift) + saved_libs="${LIBS}" + saved_cppflags="${CPPFLAGS}" + if test -d /usr/local/swift; then + SWIFT_DIR=/usr/local/swift + elif test -d /opt/swift; then + SWIFT_DIR=/opt/swift + fi + if test "x${SWIFT_DIR}" != "x"; then + if test -d ${SWIFT_DIR}/lib; then + swiftlibdir=${SWIFT_DIR}/lib + else + swiftlibdir=${SWIFT_DIR} + fi + LIBS="${LIBS} -L${swiftlibdir}" + CPPFLAGS="${CPPFLAGS} -I${SWIFT_DIR}/include" + fi + LIBS="${LIBS} -lswift -lceplex_us -lceplang_en -lm" + AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM( + [#include "swift.h"], + [swift_engine *engine = swift_engine_open(0);]) + ], + [ AC_MSG_RESULT(yes) + ac_cv_lib_swift_swift_engine_open="yes" + ], + [ AC_MSG_RESULT(no) + ac_cv_lib_swift_swift_engine_open="no" + ] + ) + LIBS="${saved_libs}" + CPPFLAGS="${saved_cppflags}" + if test "${ac_cv_lib_swift_swift_engine_open}" = "yes"; then + SWIFT_LIB="-lswift -lceplex_us -lceplang_en -lm" + if test "${SWIFT_DIR}" != ""; then + SWIFT_LIB="-L${swiftlibdir} ${SWIFT_LIB}" + SWIFT_INCLUDE="-I${SWIFT_DIR}/include" + fi + PBX_SWIFT=1 + AC_DEFINE([HAVE_SWIFT], 1, [Define if your system has the Swift API libr +ries.]) + fi +fi + if test "${USE_VPB}" != "no"; then AC_MSG_CHECKING(for vpb_open in -lvpb) saved_libs="${LIBS}" Index: include/asterisk/autoconfig.h.in =================================================================== --- include/asterisk/autoconfig.h.in (revision 166901) +++ include/asterisk/autoconfig.h.in (working copy) @@ -451,6 +451,9 @@ /* Define to indicate the ${SUPPSERV_DESCRIP} library */ #undef HAVE_SUPPSERV +/* Define if your system has the Swift API libr ries. */ +#undef HAVE_SWIFT + /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H Index: makeopts.in =================================================================== --- makeopts.in (revision 166901) +++ makeopts.in (working copy) @@ -151,6 +151,9 @@ SSL_INCLUDE=@OPENSSL_INCLUDE@ SSL_LIB=@OPENSSL_LIB@ +SWIFT_INCLUDE=@SWIFT_INCLUDE@ +SWIFT_LIB=@SWIFT_LIB@ + TONEZONE_INCLUDE=@TONEZONE_INCLUDE@ TONEZONE_LIB=@TONEZONE_LIB@