aboutsummaryrefslogtreecommitdiffstats
path: root/autoconf
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-27 20:14:33 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-27 20:14:33 +0000
commit91264d99e4ed946f9a8e8a1a1c894051cc20db2d (patch)
tree1bba12cf70bdba8598a9386ef0be7cc3eb178581 /autoconf
parent78a9222af02d1f3a18a8bb856b0ead507e2edb2e (diff)
Merged revisions 214466 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r214466 | tilghman | 2009-08-27 12:28:01 -0500 (Thu, 27 Aug 2009) | 9 lines Merged revisions 214436 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r214436 | tilghman | 2009-08-27 11:53:58 -0500 (Thu, 27 Aug 2009) | 2 lines One more build system change, to make the descriptions look better, if we have better information. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@214474 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/ast_ext_lib.m440
1 files changed, 27 insertions, 13 deletions
diff --git a/autoconf/ast_ext_lib.m4 b/autoconf/ast_ext_lib.m4
index 711690097..41f1c5b90 100644
--- a/autoconf/ast_ext_lib.m4
+++ b/autoconf/ast_ext_lib.m4
@@ -27,12 +27,35 @@ AC_DEFUN([AST_EXT_LIB_SETUP],
])
PBX_$1=0
AH_TEMPLATE(m4_bpatsubst([[HAVE_$1]], [(.*)]), [Define to 1 if you have the $2 library.])
+ AH_TEMPLATE(m4_bpatsubst([[HAVE_$1_VERSION]], [(.*)]), [Define to the version of the $2 library.])
AC_SUBST([$1_LIB])
AC_SUBST([$1_INCLUDE])
AC_SUBST([$1_DIR])
AC_SUBST([PBX_$1])
])
+# AST_EXT_LIB_SETUP_DEPENDENT([package symbol name], [package friendly name], [master package symbol name], [master package option name])
+
+AC_DEFUN([AST_EXT_LIB_SETUP_DEPENDENT],
+[
+$1_DESCRIP="$2"
+m4_ifval([$4], [$1_OPTION=$4])
+m4_ifval([$3], [
+for i in ${ac_mandatory_list}; do
+ if test "x$3" = "x$i"; then
+ ac_mandatory_list="${ac_mandatory_list} $1"
+ break
+ fi
+done
+])
+PBX_$1=0
+AH_TEMPLATE(m4_bpatsubst([[HAVE_$1]], [(.*)]), [Define to 1 if you have the $2 library.])
+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.
@@ -63,7 +86,7 @@ if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
$1_LIB="${pbxlibdir} -l$2 $5"
# if --with-$1=DIR has been specified, use it.
if test "x${$1_DIR}" != "x"; then
- $1_INCLUDE="-I${$1_DIR}/include"
+ $1_INCLUDE="-I${$1_DIR}/include"
fi
$1_INCLUDE="${$1_INCLUDE} $6"
if test "x$4" = "x" ; then # no header, assume found
@@ -79,22 +102,13 @@ if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
$1_INCLUDE=""
else
if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
- $1_LIB=""
- fi
+ $1_LIB=""
+ fi
PBX_$1=1
- if test "x${$1_OPTION}" = "x"; then
- dnl Ensure that we have an autoheader, when AST_EXT_LIB_SETUP was
- dnl not called. Note that we cannot use shell substitution in the
- dnl description, because the shell is never invoked when rendering
- dnl the autoheader. Only m4 substitutions will expand correctly.
- AC_DEFINE_UNQUOTED([HAVE_$1], 1, [Define to 1 to indicate $1 functionality.])
- AC_DEFINE_UNQUOTED([HAVE_$1_VERSION], [$7], [Define to indicate the $1 library version])
- else
- cat >>confdefs.h <<_ACEOF
+ cat >>confdefs.h <<_ACEOF
[@%:@define] HAVE_$1 1
[@%:@define] HAVE_$1_VERSION $7
_ACEOF
- fi
fi
fi
fi