summaryrefslogtreecommitdiff
path: root/autoconf
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2011-10-06 23:06:43 +0000
committerRichard Mudgett <rmudgett@digium.com>2011-10-06 23:06:43 +0000
commit6e5f97df77d5af8a3ab5bc5ea346d11860f4da0e (patch)
tree7a61a69e45d50708606772584b06223f8881166d /autoconf
parentd59bb319fc4769fa64771562f3a34bbbfc9d75bc (diff)
Merged revisions 339720 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r339720 | rmudgett | 2011-10-06 17:58:40 -0500 (Thu, 06 Oct 2011) | 27 lines Merged revisions 339719 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r339719 | rmudgett | 2011-10-06 17:47:50 -0500 (Thu, 06 Oct 2011) | 20 lines Fix regression in configure script for libpri capability checks. JIRA AST-598 added the PRI_L2_PERSISTENCE option to fix BRI PTMP TE layer 2 persistence issues with some telcos. ASTERISK-18535 attempted to fix the unexpected requirement that libpri *must* have that feature to work with Asterisk. The AST_EXT_LIB_SETUP_DEPENDENT lines made the PRI optional features required. Unfortunately, I thought AST_EXT_LIB_SETUP_DEPENDENT didn't do anything useful for libpri and deleted those lines for libpri. The result was the HAVE_PRI_xxx defines that control the ability to use optional libpri features were also deleted. * Created AST_EXT_LIB_SETUP_OPTIONAL configuration macro to allow optional features in a library that the source code could take advantage of if the code supports the feature. (closes issue ASTERISK-18687) Reported by: Norbert Tested by: rmudgett ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@339721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/ast_ext_lib.m420
1 files changed, 19 insertions, 1 deletions
diff --git a/autoconf/ast_ext_lib.m4 b/autoconf/ast_ext_lib.m4
index 16b2931a6..4842c3ee0 100644
--- a/autoconf/ast_ext_lib.m4
+++ b/autoconf/ast_ext_lib.m4
@@ -58,7 +58,8 @@ AC_ARG_WITH([$1], AC_HELP_STRING([--with-$1=PATH], [use $3 in PATH]),
AC_SUBST($2)
])
-# AST_EXT_LIB_SETUP_DEPENDENT([package symbol name], [package friendly name], [master package symbol name], [master package option name])
+# Setup required dependent package
+# AST_EXT_LIB_SETUP_DEPENDENT([dependent package symbol name], [dependent package friendly name], [master package symbol name], [master package name])
AC_DEFUN([AST_EXT_LIB_SETUP_DEPENDENT],
[
@@ -81,6 +82,23 @@ AC_SUBST([$1_DIR])
AC_SUBST([PBX_$1])
])
+# Setup optional dependent package
+# AST_EXT_LIB_SETUP_OPTIONAL([optional package symbol name], [optional package friendly name], [master package symbol name], [master package name])
+
+AC_DEFUN([AST_EXT_LIB_SETUP_OPTIONAL],
+[
+$1_DESCRIP="$2"
+m4_ifval([$4], [$1_OPTION=$4])
+m4_ifval([$3], [$1_DIR=${$3_DIR}
+])
+PBX_$1=0
+AH_TEMPLATE(m4_bpatsubst([[HAVE_$1]], [(.*)]), [Define to 1 if $3 has the $2 feature.])
+AC_SUBST([$1_LIB])
+AC_SUBST([$1_INCLUDE])
+AC_SUBST([$1_DIR])
+AC_SUBST([PBX_$1])
+])
+
# Check for existence of a given package ($1), either looking up a function
# in a library, or, if no function is supplied, only check for the
# existence of the header files.