mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 03:50:31 +00:00
Enable bundling of jansson.
Change-Id: Ib3111b151d37cbda40768cf2a8a9c6cf6c5c7cbd
This commit is contained in:
126
configure
vendored
126
configure
vendored
@@ -1058,10 +1058,7 @@ PBX_URIPARSER
|
||||
URIPARSER_DIR
|
||||
URIPARSER_INCLUDE
|
||||
URIPARSER_LIB
|
||||
PBX_JANSSON
|
||||
JANSSON_DIR
|
||||
JANSSON_INCLUDE
|
||||
JANSSON_LIB
|
||||
PBX_JACK
|
||||
JACK_DIR
|
||||
JACK_INCLUDE
|
||||
@@ -1172,6 +1169,11 @@ PBX_PJPROJECT
|
||||
PJPROJECT_DIR
|
||||
PJPROJECT_BUNDLED
|
||||
PJPROJECT_CONFIGURE_OPTS
|
||||
JANSSON_INCLUDE
|
||||
JANSSON_LIB
|
||||
PBX_JANSSON
|
||||
JANSSON_BUNDLED
|
||||
JANSSON_CONFIGURE_OPTS
|
||||
AST_C_COMPILER_FAMILY
|
||||
AST_CLANG_BLOCKS
|
||||
AST_CLANG_BLOCKS_LIBS
|
||||
@@ -1338,6 +1340,7 @@ with_download_cache
|
||||
with_sounds_cache
|
||||
with_externals_cache
|
||||
enable_coverage
|
||||
with_jansson_bundled
|
||||
with_pjproject_bundled
|
||||
with_asound
|
||||
with_bfd
|
||||
@@ -1433,6 +1436,7 @@ CXX
|
||||
CXXFLAGS
|
||||
CCC
|
||||
CXXCPP
|
||||
JANSSON_CONFIGURE_OPTS
|
||||
PJPROJECT_CONFIGURE_OPTS
|
||||
PKG_CONFIG
|
||||
PKG_CONFIG_PATH
|
||||
@@ -2085,6 +2089,7 @@ Optional Packages:
|
||||
use cached sound tarfiles in PATH
|
||||
--with-externals-cache=PATH
|
||||
use cached external module tarfiles in PATH
|
||||
--with-jansson-bundled Use bundled jansson library
|
||||
--with-pjproject-bundled
|
||||
Use bundled pjproject libraries
|
||||
--with-asound=PATH use Advanced Linux Sound Architecture files in PATH
|
||||
@@ -2180,6 +2185,8 @@ Some influential environment variables:
|
||||
CXX C++ compiler command
|
||||
CXXFLAGS C++ compiler flags
|
||||
CXXCPP C++ preprocessor
|
||||
JANSSON_CONFIGURE_OPTS
|
||||
Additional configure options to pass to bundled jansson
|
||||
PJPROJECT_CONFIGURE_OPTS
|
||||
Additional configure options to pass to bundled pjproject
|
||||
PKG_CONFIG path to pkg-config utility
|
||||
@@ -9127,6 +9134,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
|
||||
JANSSON_BUNDLED=no
|
||||
|
||||
# Check whether --with-jansson-bundled was given.
|
||||
if test "${with_jansson_bundled+set}" = set; then :
|
||||
withval=$with_jansson_bundled; case "${withval}" in
|
||||
y|yes) JANSSON_BUNDLED=yes ;;
|
||||
*) JANSSON_BUNDLED=no ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
PJPROJECT_BUNDLED=no
|
||||
|
||||
|
||||
@@ -9142,6 +9160,92 @@ fi
|
||||
|
||||
|
||||
|
||||
if test "$JANSSON_BUNDLED" = "yes" ; then
|
||||
|
||||
if test "${ac_mandatory_list#*JANSSON*}" != "$ac_mandatory_list" ; then
|
||||
as_fn_error $? "--with-jansson and --with-jansson-bundled can't both be specified" "$LINENO" 5
|
||||
fi
|
||||
|
||||
ac_mandatory_list="$ac_mandatory_list JANSSON"
|
||||
JANSSON_DIR="${ac_pwd}/third-party/jansson"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for embedded jansson (may have to download)" >&5
|
||||
$as_echo_n "checking for embedded jansson (may have to download)... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: configuring" >&5
|
||||
$as_echo "configuring" >&6; }
|
||||
|
||||
if test "x${DOWNLOAD_TO_STDOUT}" = "x" ; then
|
||||
as_fn_error $? "A download utility (wget, curl, or fetch) is required to download bundled jansson" "$LINENO" 5
|
||||
fi
|
||||
if test "${BZIP2}" = ":" ; then
|
||||
as_fn_error $? "bzip2 is required to extract the jansson tar file" "$LINENO" 5
|
||||
fi
|
||||
if test "${TAR}" = ":" ; then
|
||||
as_fn_error $? "tar is required to extract the jansson tar file" "$LINENO" 5
|
||||
fi
|
||||
if test "${PATCH}" = ":" ; then
|
||||
as_fn_error $? "patch is required to configure bundled jansson" "$LINENO" 5
|
||||
fi
|
||||
if test "${SED}" = ":" ; then
|
||||
as_fn_error $? "sed is required to configure bundled jansson" "$LINENO" 5
|
||||
fi
|
||||
if test "${NM}" = ":" ; then
|
||||
as_fn_error $? "nm is required to build bundled jansson" "$LINENO" 5
|
||||
fi
|
||||
if test "${MD5}" = ":" ; then
|
||||
as_fn_error $? "md5sum is required to build bundled jansson" "$LINENO" 5
|
||||
fi
|
||||
if test "${CAT}" = ":" ; then
|
||||
as_fn_error $? "cat is required to build bundled jansson" "$LINENO" 5
|
||||
fi
|
||||
if test "${CUT}" = ":" ; then
|
||||
as_fn_error $? "cut is required to build bundled jansson" "$LINENO" 5
|
||||
fi
|
||||
if test "${GREP}" = ":" ; then
|
||||
as_fn_error $? "grep is required to build bundled jansson" "$LINENO" 5
|
||||
fi
|
||||
|
||||
|
||||
this_host=$(./config.sub $(./config.guess))
|
||||
if test "$build" != "$this_host" ; then
|
||||
JANSSON_CONFIGURE_OPTS+=" --build=$build"
|
||||
fi
|
||||
if test "$host" != "$this_host" ; then
|
||||
JANSSON_CONFIGURE_OPTS+=" --host=$host"
|
||||
fi
|
||||
|
||||
export TAR PATCH SED NM EXTERNALS_CACHE_DIR AST_DOWNLOAD_CACHE DOWNLOAD_TO_STDOUT DOWNLOAD_TIMEOUT DOWNLOAD MD5 CAT CUT GREP
|
||||
export NOISY_BUILD
|
||||
${GNU_MAKE} --quiet --no-print-directory -C ${JANSSON_DIR} \
|
||||
JANSSON_CONFIGURE_OPTS="$JANSSON_CONFIGURE_OPTS" \
|
||||
EXTERNALS_CACHE_DIR="${EXTERNALS_CACHE_DIR:-${AST_DOWNLOAD_CACHE}}" \
|
||||
configure
|
||||
if test $? -ne 0 ; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
|
||||
$as_echo "failed" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Unable to configure ${JANSSON_DIR}" >&5
|
||||
$as_echo "$as_me: Unable to configure ${JANSSON_DIR}" >&6;}
|
||||
as_fn_error $? "Re-run the ./configure command with 'NOISY_BUILD=yes' appended to see error details." "$LINENO" 5
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bundled jansson" >&5
|
||||
$as_echo_n "checking for bundled jansson... " >&6; }
|
||||
|
||||
JANSSON_INCLUDE=-I${JANSSON_DIR}/dest/include
|
||||
JANSSON_CFLAGS="$JANSSON_INCLUDE"
|
||||
JANSSON_LIB="-L${JANSSON_DIR}/dest/lib -ljansson"
|
||||
PBX_JANSSON=1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if test "$PJPROJECT_BUNDLED" = "yes" ; then
|
||||
|
||||
if test "${ac_mandatory_list#*PJPROJECT*}" != "$ac_mandatory_list" ; then
|
||||
@@ -14074,7 +14178,8 @@ fi
|
||||
|
||||
|
||||
|
||||
# Find required JSON support.
|
||||
# Find required JSON support if bundled is not enabled.
|
||||
if test "$JANSSON_BUNDLED" = "no" ; then
|
||||
|
||||
if test "x${PBX_JANSSON}" != "x1" -a "${USE_JANSSON}" != "no"; then
|
||||
pbxlibdir=""
|
||||
@@ -14172,8 +14277,17 @@ fi
|
||||
|
||||
|
||||
|
||||
if test "${PBX_JANSSON}" != 1; then
|
||||
as_fn_error $? "*** JSON support not found (this typically means the libjansson development package is missing)" "$LINENO" 5
|
||||
if test "${PBX_JANSSON}" != 1; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: *** Asterisk requires libjansson and no system copy was found." >&5
|
||||
$as_echo "$as_me: *** Asterisk requires libjansson and no system copy was found." >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: *** Please install the 'libjansson' development package or" >&5
|
||||
$as_echo "$as_me: *** Please install the 'libjansson' development package or" >&6;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: *** use './configure --with-jansson-bundled'" >&5
|
||||
$as_echo "$as_me: *** use './configure --with-jansson-bundled'" >&6;}
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
PBX_JANSSON=1
|
||||
fi
|
||||
|
||||
# See if clock_gettime is in librt
|
||||
|
Reference in New Issue
Block a user