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/branches/1.8@339719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2011-10-06 22:47:50 +00:00
parent 06e6b7bba1
commit d4dcb0f259
4 changed files with 32061 additions and 5146 deletions

View File

@@ -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.