[svn-commits] russell: trunk r196946 - in /trunk: ./ autoconf/ include/asterisk/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue May 26 17:40:39 CDT 2009
Author: russell
Date: Tue May 26 17:40:34 2009
New Revision: 196946
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=196946
Log:
Update configure script to check for OSP toolkit 3.5.0.
(closes issue #14988)
Reported by: tzafrir
Patches:
configure.ac.diff uploaded by homesick (license 91)
new_ast_check_osptk.m4 uploaded by homesick (license 91)
Added:
trunk/autoconf/ast_check_osptk.m4 (with props)
Modified:
trunk/configure
trunk/configure.ac
trunk/include/asterisk/autoconfig.h.in
Added: trunk/autoconf/ast_check_osptk.m4
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/autoconf/ast_check_osptk.m4?view=auto&rev=196946
==============================================================================
--- trunk/autoconf/ast_check_osptk.m4 (added)
+++ trunk/autoconf/ast_check_osptk.m4 Tue May 26 17:40:34 2009
@@ -1,0 +1,67 @@
+dnl
+dnl @synopsis AST_CHECK_OSPTK([REQ_VER_MAJOR],[REQ_VER_MINOR],[REQ_VER_BUGFIX])
+dnl
+dnl @summary check for existence of OSP Toolkit package
+dnl
+dnl This macro check for existence of OSP Toolkit package by checking osp/osp.h
+dnl header file, OSPPInit function and OSP Toolkit version.
+dnl
+AC_DEFUN([AST_CHECK_OSPTK],
+[
+ # if OSPTK has not been checked and is not excluded
+ if test "x${PBX_OSPTK}" != "x1" -a "${USE_OSPTK}" != "no"; then
+ # if --with-osptk=DIR has been specified, use it.
+ if test "x${OSPTK_DIR}" != "x"; then
+ osptk_cflags="-I${OSPTK_DIR}/include"
+ osptk_ldflags="-L${OSPTK_DIR}/lib"
+ else
+ osptk_cflags=""
+ osptk_ldflags=""
+ fi
+
+ # check for the header
+ osptk_saved_cppflags="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${osptk_cflags}"
+ AC_CHECK_HEADER([osp/osp.h], [osptk_header_found=yes], [osptk_header_found=no])
+ CPPFLAGS="${osptk_saved_cppflags}"
+
+ # check for the library
+ if test "${osptk_header_found}" = "yes"; then
+ osptk_extralibs="-lssl -lcrypto"
+
+ AC_CHECK_LIB([osptk], [OSPPInit], [osptk_library_found=yes], [osptk_library_found=no], ${osptk_ldflags} ${osptk_extralibs})
+
+ # check OSP Toolkit version
+ if test "${osptk_library_found}" = "yes"; then
+ AC_MSG_CHECKING(if OSP Toolkit version is compatible with app_osplookup)
+
+ osptk_saved_cppflags="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${osptk_cflags}"
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+ #include <osp/osp.h>
+ int main(void) {
+ int ver = OSP_CLIENT_TOOLKIT_VERSION_MAJOR * 10000 + OSP_CLIENT_TOOLKIT_VERSION_MINOR * 100 + OSP_CLIENT_TOOLKIT_VERSION_BUGFIX;
+ int req = $1 * 10000 + $2 * 100 + $3;
+ return (ver < req) ? 1 : 0;
+ }
+ ]])],
+ [osptk_compatible=yes],
+ [osptk_compatible=no]
+ )
+ CPPFLAGS="${osptk_saved_cppflags}"
+
+ if test "${osptk_compatible}" = "yes"; then
+ AC_MSG_RESULT(yes)
+ PBX_OSPTK=1
+ OSPTK_INCLUDE="${osptk_cflags}"
+ OSPTK_LIB="${osptk_ldflags} -losptk ${osptk_extralibs}"
+ AC_DEFINE_UNQUOTED([HAVE_OSPTK], 1, [Define this to indicate the ${OSPTK_DESCRIP} library])
+ else
+ AC_MSG_RESULT(no)
+ fi
+ fi
+ fi
+ fi
+])
+
Propchange: trunk/autoconf/ast_check_osptk.m4
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: trunk/autoconf/ast_check_osptk.m4
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: trunk/autoconf/ast_check_osptk.m4
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: trunk/configure.ac
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/configure.ac?view=diff&rev=196946&r1=196945&r2=196946
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Tue May 26 17:40:34 2009
@@ -1555,7 +1555,7 @@
if test "$PBX_OPENSSL" = "1";
then
- AST_EXT_LIB_CHECK([OSPTK], [osptk], [OSPPCryptoDecrypt], [osp/osp.h], [-lcrypto -lssl])
+ AST_CHECK_OSPTK([3], [5], [0])
fi
AST_EXT_TOOL_CHECK([GMIME], [gmime], [], [], [#include <gmime/gmime.h>], [gboolean q = g_mime_check_version(0,0,0);])
Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=196946&r1=196945&r2=196946
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Tue May 26 17:40:34 2009
@@ -637,9 +637,6 @@
/* Define this to indicate the ${OSPTK_DESCRIP} library */
#undef HAVE_OSPTK
-
-/* Define to indicate the ${OSPTK_DESCRIP} library version */
-#undef HAVE_OSPTK_VERSION
/* Define this to indicate the ${OSS_DESCRIP} library */
#undef HAVE_OSS
More information about the svn-commits
mailing list