mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Enable bundling of jansson, require 2.11.
Change-Id: Ib3111b151d37cbda40768cf2a8a9c6cf6c5c7cbd
This commit is contained in:
25
configure.ac
25
configure.ac
@@ -423,6 +423,15 @@ AC_SUBST(AST_CODE_COVERAGE)
|
||||
AST_CHECK_RAII()
|
||||
AST_CHECK_STRSEP_ARRAY_BOUNDS()
|
||||
|
||||
JANSSON_BUNDLED=no
|
||||
AC_ARG_WITH([jansson-bundled],
|
||||
[AS_HELP_STRING([--with-jansson-bundled],
|
||||
[Use bundled jansson library])],
|
||||
[case "${withval}" in
|
||||
y|yes) JANSSON_BUNDLED=yes ;;
|
||||
*) JANSSON_BUNDLED=no ;;
|
||||
esac])
|
||||
|
||||
PJPROJECT_BUNDLED=yes
|
||||
AH_TEMPLATE(m4_bpatsubst([[HAVE_PJPROJECT_BUNDLED]], [(.*)]), [Define to 1 when using the bundled pjproject.])
|
||||
|
||||
@@ -652,11 +661,19 @@ fi
|
||||
AC_SUBST(UUID_INCLUDE)
|
||||
AC_SUBST(UUID_LIB)
|
||||
|
||||
# Find required JSON support.
|
||||
AST_EXT_LIB_CHECK([JANSSON], [jansson], [json_dumps], [jansson.h])
|
||||
# Find required JSON support if bundled is not enabled.
|
||||
if test "$JANSSON_BUNDLED" = "no" ; then
|
||||
# json_sprintf is available in 2.11+
|
||||
AST_EXT_LIB_CHECK([JANSSON], [jansson], [json_sprintf], [jansson.h])
|
||||
|
||||
if test "${PBX_JANSSON}" != 1; then
|
||||
AC_MSG_ERROR([*** JSON support not found (this typically means the libjansson development package is missing)])
|
||||
if test "${PBX_JANSSON}" != 1; then
|
||||
AC_MSG_NOTICE(*** Asterisk requires libjansson >= 2.11 and no system copy was found.)
|
||||
AC_MSG_NOTICE(*** Please install the 'libjansson' development package or)
|
||||
AC_MSG_NOTICE(*** use './configure --with-jansson-bundled')
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
PBX_JANSSON=1
|
||||
fi
|
||||
|
||||
# See if clock_gettime is in librt
|
||||
|
Reference in New Issue
Block a user